original_string: public static function is_defaulticon_allowed($mimetype, $oldextension = '') {
          $mimeinfo = get_mimetypes_array();
          if ($oldextension !== '') {
              unset($mimeinfo[$oldextension]);
          }
          foreach ($mimeinfo as $extension => $values) {
              if ($values['type'] !== $mimetype) {
                  continue;
              }
              if (!empty($values['defaulticon'])) {
                  return false;
              }
          }
          return true;
      }
code: public static function is_defaulticon_allowed($mimetype, $oldextension = '') {
          $mimeinfo = get_mimetypes_array();
          if ($oldextension !== '') {
              unset($mimeinfo[$oldextension]);
          }
          foreach ($mimeinfo as $extension => $values) {
              if ($values['type'] !== $mimetype) {
                  continue;
              }
              if (!empty($values['defaulticon'])) {
                  return false;
              }
          }
          return true;
      }
code_tokens: public static function is_defaulticon_allowed ( $ mimetype , $ oldextension = '' ) { $ mimeinfo = get_mimetypes_array ( ) ; if ( $ oldextension !== '' ) { unset ( $ mimeinfo [ $ oldextension ] ) ; } foreach ( $ mimeinfo as $ extension => $ values ) { if ( $ values [ 'type' ] !== $ mimetype ) { continue ; } if ( ! empty ( $ values [ 'defaulticon' ] ) ) { return false ; } } return true ; }
docstring: Checks if we are allowed to turn on the 'default icon' option. You can
  only have one of these for a given MIME type.
  
  @param string $mimetype MIME type
  @param string $oldextension File extension name (before any change)
docstring_tokens: Checks if we are allowed to turn on the default icon option . You can only have one of these for a given MIME type .