diff options
author | Matěj Suchánek <matejsuchanek97@gmail.com> | 2022-05-09 11:09:00 +0200 |
---|---|---|
committer | Matěj Suchánek <matejsuchanek97@gmail.com> | 2022-05-10 12:46:11 +0000 |
commit | e47c44107882ecdd58ae900f9d8b176688160d68 (patch) | |
tree | d58b32ba31c6dc9ae43aed0f14ea5cbd77ca02a0 | |
parent | e9eb4f60d68f9ed4e7cd693d3e85b4e1d7945672 (diff) | |
download | mediawikicore-e47c44107882ecdd58ae900f9d8b176688160d68.tar.gz mediawikicore-e47c44107882ecdd58ae900f9d8b176688160d68.zip |
Fix many typos in comments
Found using IntelliJ's "Typo" code inspection.
Change-Id: I746220ebe6e1e39f6cb503390ec9053e6518cf16
88 files changed, 126 insertions, 126 deletions
diff --git a/docs/config-schema.yaml b/docs/config-schema.yaml index 1bc8e3f89ea4..8d741d5c3e46 100644 --- a/docs/config-schema.yaml +++ b/docs/config-schema.yaml @@ -7502,7 +7502,7 @@ config-schema: default: 1 description: |- Number of jobs to perform per request. May be less than one in which case - jobs are performed probabalistically. If this is zero, jobs will not be done + jobs are performed probabilistically. If this is zero, jobs will not be done during ordinary apache requests. In this case, maintenance/runJobs.php should be run periodically. RunJobsAsync: @@ -7571,7 +7571,7 @@ config-schema: can run on each CDN cache node and perform local purges based on the URL purge channel events. Some extensions may want to use "channel categories" so that different channels can also - share the same custom relayer instance (e.g. when it's likely to be overriden). They can use + share the same custom relayer instance (e.g. when it's likely to be overridden). They can use EventRelayerGroup::getRelayer() based on the category but call notify() on various different actual channels. One reason for this would be that some system have very different performance vs durability needs, so one system (e.g. Kafka) may not be suitable for all diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 600b2697ddfd..b1a679311ab8 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2233,7 +2233,7 @@ function wfIsInfinity( $str ) { * $params is considered non-standard if they involve a non-standard * width or any non-default parameters aside from width and page number. * The number of possible files with standard parameters is far less than - * that of all combinations; rate-limiting for them can thus be more generious. + * that of all combinations; rate-limiting for them can thus be more generous. * * @param File $file * @param array $params @@ -2286,7 +2286,7 @@ function wfThumbIsStandard( File $file, array $params ) { // Append any default values to the map (e.g. "lossy", "lossless", ...) $handler->normaliseParams( $file, $normalParams ); } else { - // If not, then check if the width matchs one of $wgImageLimits + // If not, then check if the width matches one of $wgImageLimits $match = false; foreach ( $imageLimits as $pair ) { $normalParams = $basicParams + [ 'width' => $pair[0], 'height' => $pair[1] ]; diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php index 335f2ae45ff8..eee2ef4106c3 100644 --- a/includes/LinkFilter.php +++ b/includes/LinkFilter.php @@ -145,7 +145,7 @@ class LinkFilter { } } - // Regularlize explicit specification of the DNS root. + // Regularize explicit specification of the DNS root. // Browsers seem to do this for IPv4 literals too. if ( substr( $host, -1 ) === '.' ) { $host = substr( $host, 0, -1 ); diff --git a/includes/MainConfigSchema.php b/includes/MainConfigSchema.php index 25a0cf514b20..072fb35b3639 100644 --- a/includes/MainConfigSchema.php +++ b/includes/MainConfigSchema.php @@ -11775,7 +11775,7 @@ class MainConfigSchema { /** * Number of jobs to perform per request. May be less than one in which case - * jobs are performed probabalistically. If this is zero, jobs will not be done + * jobs are performed probabilistically. If this is zero, jobs will not be done * during ordinary apache requests. In this case, maintenance/runJobs.php should * be run periodically. */ @@ -11886,7 +11886,7 @@ class MainConfigSchema { * events. * * Some extensions may want to use "channel categories" so that different channels can also - * share the same custom relayer instance (e.g. when it's likely to be overriden). They can use + * share the same custom relayer instance (e.g. when it's likely to be overridden). They can use * EventRelayerGroup::getRelayer() based on the category but call notify() on various different * actual channels. One reason for this would be that some system have very different * performance vs durability needs, so one system (e.g. Kafka) may not be suitable for all diff --git a/includes/ParamValidator/TypeDef/UserDef.php b/includes/ParamValidator/TypeDef/UserDef.php index 3e7c3c3c42e5..cfa581f26d1e 100644 --- a/includes/ParamValidator/TypeDef/UserDef.php +++ b/includes/ParamValidator/TypeDef/UserDef.php @@ -194,7 +194,7 @@ class UserDef extends TypeDef { // for User objects (local is the default, but we specify it anyway to show // that its intentional even though the username is for a different wiki) // NOTE: We deliberately use the raw $value instead of the canonical $name - // to avoid convering the first character of the interwiki prefix to uppercase + // to avoid converting the first character of the interwiki prefix to uppercase $user = $name !== false ? new UserIdentityValue( 0, $value, UserIdentityValue::LOCAL ) : null; return [ 'interwiki', $user ]; } diff --git a/includes/Rest/Handler.php b/includes/Rest/Handler.php index 0437ef881ac6..b7d84799af19 100644 --- a/includes/Rest/Handler.php +++ b/includes/Rest/Handler.php @@ -108,7 +108,7 @@ abstract class Handler { * * Keeps intact ;@$!*(),~: (urlencode does not, but wfUrlencode does). * Encodes spaces as underscores (wfUrlencode does not). - * Encodes slashes (wfUrlencode does not, but keeping them messes with REST pathes). + * Encodes slashes (wfUrlencode does not, but keeping them messes with REST paths). * Encodes pluses (this is not necessary, and may change). * * @see wfUrlencode diff --git a/includes/Rest/Handler/PageHistoryCountHandler.php b/includes/Rest/Handler/PageHistoryCountHandler.php index 41075ec1721c..d93aa0b24a9b 100644 --- a/includes/Rest/Handler/PageHistoryCountHandler.php +++ b/includes/Rest/Handler/PageHistoryCountHandler.php @@ -356,7 +356,7 @@ class PageHistoryCountHandler extends SimpleHandler { * Generating an etag when getting revision counts must account for things like visibility settings * (e.g. rev_deleted bit) which requires hitting the database anyway. The response for these * requests are so small that we wouldn't be gaining much efficiency. - * Etags are strong validators and if provided would take precendence over + * Etags are strong validators and if provided would take precedence over * last modified time, a weak validator. We want to ensure only last modified time is used * since it is more efficient than using etags for this particular case. * @return null diff --git a/includes/Rest/RequestFromGlobals.php b/includes/Rest/RequestFromGlobals.php index a0025214e452..7a07c354aab6 100644 --- a/includes/Rest/RequestFromGlobals.php +++ b/includes/Rest/RequestFromGlobals.php @@ -44,7 +44,7 @@ class RequestFromGlobals extends RequestBase { // // Since $requestUrl here is absolute-path references // so all titles that contain colon followed by a - // number would be inacessible if the exception occurs. + // number would be inaccessible if the exception occurs. $uriInstance = ( new Uri( '//HOST:80' . $requestUrl ) )->withScheme( '' )->withHost( '' )->withPort( null ); diff --git a/includes/Rest/Validator/Validator.php b/includes/Rest/Validator/Validator.php index e259ee32f5ed..51469de9a7f9 100644 --- a/includes/Rest/Validator/Validator.php +++ b/includes/Rest/Validator/Validator.php @@ -98,7 +98,7 @@ class Validator { * Validate parameters * @param array[] $paramSettings Parameter settings * @return array Validated parameters - * @throws HttpException on validaton failure + * @throws HttpException on validation failure */ public function validateParams( array $paramSettings ) { $validatedParams = []; diff --git a/includes/Revision/RevisionStore.php b/includes/Revision/RevisionStore.php index 74325e5f4022..e1695dfafe63 100644 --- a/includes/Revision/RevisionStore.php +++ b/includes/Revision/RevisionStore.php @@ -1148,7 +1148,7 @@ class RevisionStore * @param SlotRecord $slot The SlotRecord to load content for * @param string|null $blobData The content blob, in the form indicated by $blobFlags * @param string|null $blobFlags Flags indicating how $blobData needs to be processed. - * Use null if no processing should happen. That is in constrast to the empty string, + * Use null if no processing should happen. That is in contrast to the empty string, * which causes the blob to be decoded according to the configured legacy encoding. * @param string|null $blobFormat MIME type indicating how $dataBlob is encoded * @param int $queryFlags @@ -2309,7 +2309,7 @@ class RevisionStore $lb = $this->getDBLoadBalancer(); - // Make sure new pending/committed revision are visibile later on + // Make sure new pending/committed revision are visible later on // within web requests to certain avoid bugs like T93866 and T94407. if ( !$rev && !( $flags & self::READ_LATEST ) diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php index 980397e18c16..79c793f6bdbb 100644 --- a/includes/Storage/DerivedPageDataUpdater.php +++ b/includes/Storage/DerivedPageDataUpdater.php @@ -1340,7 +1340,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface, P $this->doTransition( 'has-revision' ); // NOTE: in case we have a User object, don't override with a UserIdentity. - // We already checked that $revision->getUser() mathces $this->user; + // We already checked that $revision->getUser() matches $this->user; if ( !$this->user ) { $this->user = $revision->getUser( RevisionRecord::RAW ); } @@ -1437,7 +1437,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface, P public function getSecondaryDataUpdates( $recursive = false ) { if ( $this->isContentDeleted() ) { // This shouldn't happen, since the current content is always public, - // and DataUpates are only needed for current content. + // and DataUpdates are only needed for current content. return []; } @@ -1555,7 +1555,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface, P $this->doSecondaryDataUpdates( [ // T52785 do not update any other pages on a null edit 'recursive' => $this->options['changed'], - // Defer the getCannonicalParserOutput() call made by getSecondaryDataUpdates() + // Defer the getCanonicalParserOutput() call made by getSecondaryDataUpdates() 'defer' => DeferredUpdates::POSTSEND ] ); diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php index 5bd0f7bf41ff..decd5b6982e5 100644 --- a/includes/TemplateParser.php +++ b/includes/TemplateParser.php @@ -149,7 +149,7 @@ class TemplateParser { } } - // We're not using the cached code for whathever reason. Recompile the template and + // We're not using the cached code for whatever reason. Recompile the template and // cache it. if ( !$compiledTemplate ) { $compiledTemplate = $this->compile( $templateName ); diff --git a/includes/Title.php b/includes/Title.php index 8ed41682759c..cc347b737c90 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2552,7 +2552,7 @@ class Title implements LinkTarget, PageIdentity, IDBAccessObject { * themselves. * @return array Two elements: First is an array of Title objects of the * pages from which cascading restrictions have come if $getPages - * is true, or a bool indicating whetehr any cascading protection + * is true, or a bool indicating whether any cascading protection * applies if $getPages was set to false. * Second is an array like that returned by Title::getAllRestrictions(), * or an empty array if $getPages is false. @@ -2943,7 +2943,7 @@ class Title implements LinkTarget, PageIdentity, IDBAccessObject { * * @note This overrides Title::setContentModel() * - * @param int|bool $id Page ID, 0 for non-existant, or false for "unknown" (lazy-load) + * @param int|bool $id Page ID, 0 for non-existent, or false for "unknown" (lazy-load) */ public function resetArticleID( $id ) { if ( $id === false ) { diff --git a/includes/WikiMap.php b/includes/WikiMap.php index a4ddac84bf0c..94dfb2a41ed0 100644 --- a/includes/WikiMap.php +++ b/includes/WikiMap.php @@ -274,7 +274,7 @@ class WikiMap { // all wikis in the farm. Historically, any wiki farm had to make the database/prefix // combination unique per wiki. Omit the schema if it does not seem wiki specific. if ( !in_array( $domain->getSchema(), [ null, 'mediawiki' ], true ) ) { - // This means a site admin may have specifically taylored the schemas. + // This means a site admin may have specifically tailored the schemas. // Domain IDs might use the form <DB>-<project>- or <DB>-<project>-<language>_, // meaning that the schema portion must be accounted for to disambiguate wikis. return "{$domain->getDatabase()}-{$domain->getSchema()}-{$domain->getTablePrefix()}"; diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index d8339ba23586..ccfdc3f3ded9 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -324,7 +324,7 @@ class RawAction extends FormlessAction { $ctype = $this->getRequest()->getRawVal( 'ctype' ); if ( $ctype == '' ) { - // Legacy compatibilty + // Legacy compatibility $gen = $this->getRequest()->getRawVal( 'gen' ); if ( $gen == 'js' ) { $ctype = 'text/javascript'; diff --git a/includes/api/ApiQueryUserContribs.php b/includes/api/ApiQueryUserContribs.php index d2b6646d3ba4..4c3fe6ca26d3 100644 --- a/includes/api/ApiQueryUserContribs.php +++ b/includes/api/ApiQueryUserContribs.php @@ -108,7 +108,7 @@ class ApiQueryUserContribs extends ApiQueryBase { $this->fld_tags = isset( $prop['tags'] ); // The main query may use the 'contributions' group DB, which can map to replica DBs - // with extra user based indexes or partioning by user. The additional metadata + // with extra user based indexes or partitioning by user. The additional metadata // queries should use a regular replica DB since the lookup pattern is not all by user. $dbSecondary = $this->getDB(); // any random replica DB diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index c5886f574d51..77c83823cde2 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -574,7 +574,7 @@ class AuthManager implements LoggerAwareInterface { // @codeCoverageIgnoreEnd } } - // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Alwyas set in loop before, if passed + // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Always set in loop before, if passed if ( $state['primary'] === null ) { $this->logger->debug( 'Login failed in primary authentication because no provider accepted' ); $ret = AuthenticationResponse::newFail( @@ -636,7 +636,7 @@ class AuthManager implements LoggerAwareInterface { } } - // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Alwyas set in loop before, if passed + // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Always set in loop before, if passed $res = $state['primaryResponse']; if ( $res->username === null ) { $provider = $this->getAuthenticationProvider( $state['primary'] ); @@ -1433,7 +1433,7 @@ class AuthManager implements LoggerAwareInterface { // @codeCoverageIgnoreEnd } } - // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Alwyas set in loop before, if passed + // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Always set in loop before, if passed if ( $state['primary'] === null ) { $this->logger->debug( __METHOD__ . ': Primary creation failed because no provider accepted', [ 'user' => $user->getName(), @@ -1524,7 +1524,7 @@ class AuthManager implements LoggerAwareInterface { // Inform the provider // @phan-suppress-next-next-line PhanPossiblyUndeclaredVariable - // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Alwyas set in loop before, if passed + // @phan-suppress-next-line PhanTypePossiblyInvalidDimOffset Always set in loop before, if passed $logSubtype = $provider->finishAccountCreation( $user, $creator, $state['primaryResponse'] ); // Log the creation diff --git a/includes/auth/RememberMeAuthenticationRequest.php b/includes/auth/RememberMeAuthenticationRequest.php index d5935a173d97..1d1a2b076146 100644 --- a/includes/auth/RememberMeAuthenticationRequest.php +++ b/includes/auth/RememberMeAuthenticationRequest.php @@ -53,7 +53,7 @@ class RememberMeAuthenticationRequest extends AuthenticationRequest { public const ALWAYS_REMEMBER = 'always'; /** - * Indicates that the user will never be rememberd. + * Indicates that the user will never be remembered. */ public const NEVER_REMEMBER = 'never'; diff --git a/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php b/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php index 4f82e53f6cd7..430a99c6b9ed 100644 --- a/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php +++ b/includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php @@ -66,7 +66,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider * @param UserOptionsLookup $userOptionsLookup * @param array $params * - emailEnabled: (bool) must be true for the option to email passwords to be present - * - newPasswordExpiry: (int) expiraton time of temporary passwords, in seconds + * - newPasswordExpiry: (int) expiration time of temporary passwords, in seconds * - passwordReminderResendTime: (int) cooldown period in hours until a password reminder can * be sent to the same user again */ diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index 99b28255e83e..48f7919b8fad 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -594,7 +594,7 @@ abstract class ContentHandler { * (Note that in older versions of MediaWiki the hook documentation instructed extensions * to return false from the hook; you should not rely on always being able to decorate * the DifferenceEngine instance from the hook. If the owner of the content type wants to - * decorare the instance, overriding this method is a safer approach.) + * decorate the instance, overriding this method is a safer approach.) * * @todo This is page-level functionality so it should not belong to ContentHandler. * Move it to a better place once one exists (e.g. PageTypeHandler). diff --git a/includes/debug/logger/MonologSpi.php b/includes/debug/logger/MonologSpi.php index 87adef790604..75afad33dce2 100644 --- a/includes/debug/logger/MonologSpi.php +++ b/includes/debug/logger/MonologSpi.php @@ -189,7 +189,7 @@ class MonologSpi implements Spi { */ public function getLogger( $channel ) { if ( !isset( $this->singletons['loggers'][$channel] ) ) { - // Fallback to using the '@default' configuration if an explict + // Fallback to using the '@default' configuration if an explicit // configuration for the requested channel isn't found. $spec = $this->config['loggers'][$channel] ?? $this->config['loggers']['@default']; diff --git a/includes/diff/DiffEngine.php b/includes/diff/DiffEngine.php index a50db1c4352b..d4f58d1a7cdf 100644 --- a/includes/diff/DiffEngine.php +++ b/includes/diff/DiffEngine.php @@ -691,7 +691,7 @@ class DiffEngine { } /* * computing the true LCS is too expensive, instead find the diagonal - * with the most progress and pretend a midle snake of length 0 occurs + * with the most progress and pretend a middle snake of length 0 occurs * there. */ diff --git a/includes/diff/TextSlotDiffRenderer.php b/includes/diff/TextSlotDiffRenderer.php index 9d405aae7cb0..9af3a7266b0e 100644 --- a/includes/diff/TextSlotDiffRenderer.php +++ b/includes/diff/TextSlotDiffRenderer.php @@ -102,7 +102,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { /** * Set which diff engine to use. * @param string $type One of the ENGINE_* constants. - * @param string|null $executable Path to an external exectable, only when type is ENGINE_EXTERNAL. + * @param string|null $executable Path to an external executable, only when type is ENGINE_EXTERNAL. */ public function setEngine( $type, $executable = null ) { $engines = [ self::ENGINE_PHP, self::ENGINE_WIKIDIFF2, self::ENGINE_EXTERNAL, @@ -190,7 +190,7 @@ class TextSlotDiffRenderer extends SlotDiffRenderer { */ protected function getTextDiffInternal( $oldText, $newText ) { // TODO move most of this into three parallel implementations of a text diff generator - // class, choose which one to use via dependecy injection + // class, choose which one to use via dependency injection $oldText = str_replace( "\r\n", "\n", $oldText ); $newText = str_replace( "\r\n", "\n", $newText ); diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 6d76ae3b970c..0a0a2b87964a 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -1736,7 +1736,7 @@ class FileRepo { } /** - * Determine if a relative path is valid, i.e. not blank or involving directory traveral + * Determine if a relative path is valid, i.e. not blank or involving directory traversal * * @param string $filename * @return bool diff --git a/includes/language/Language.php b/includes/language/Language.php index ae015d948acb..580561d56c26 100644 --- a/includes/language/Language.php +++ b/includes/language/Language.php @@ -659,7 +659,7 @@ class Language { /** * @return array<string,int> Map from names to namespace IDs. Note that each - * namepace ID can have multiple alias. + * namespace ID can have multiple alias. */ public function getNamespaceAliases() { if ( $this->namespaceAliases === null ) { @@ -2762,7 +2762,7 @@ class Language { if ( $this->isMultibyte( $str ) ) { $str = $this->lc( $str ); - // since \b doesn't work for UTF-8, we explicitely define word break chars + // since \b doesn't work for UTF-8, we explicitly define word break chars $breaks = "[ \-\(\)\}\{\.,\?!]"; // find first letter after word break @@ -3690,7 +3690,7 @@ class Language { return $text; // string short enough even *with* HTML (short-circuit) } - $dispLen = 0; // innerHTML legth so far + $dispLen = 0; // innerHTML length so far $testingEllipsis = false; // checking if ellipses will make string longer/equal? $tagType = 0; // 0-open, 1-close $bracketState = 0; // 1-tag start, 2-tag name, 0-neither @@ -3702,7 +3702,7 @@ class Language { $textLen = strlen( $text ); $neLength = max( 0, $length - strlen( $ellipsis ) ); // non-ellipsis len if truncated for ( $pos = 0; true; ++$pos ) { - # Consider truncation once the display length has reached the maximim. + # Consider truncation once the display length has reached the maximum. # We check if $dispLen > 0 to grab tags for the $neLength = 0 case. # Check that we're not in the middle of a bracket/entity... if ( $dispLen && $dispLen >= $neLength && $bracketState == 0 && !$entityState ) { diff --git a/includes/language/converters/KuConverter.php b/includes/language/converters/KuConverter.php index 49eb25eb534f..f793e39d9cb8 100644 --- a/includes/language/converters/KuConverter.php +++ b/includes/language/converters/KuConverter.php @@ -194,7 +194,7 @@ class KuConverter extends LanguageConverterSpecific { /** * It translates text into variant, specials: - * - ommiting roman numbers + * - omitting roman numbers * * @param string $text * @param string $toVariant diff --git a/includes/languages/data/CrhExceptions.php b/includes/languages/data/CrhExceptions.php index 01640e32c771..77aa1d82914a 100644 --- a/includes/languages/data/CrhExceptions.php +++ b/includes/languages/data/CrhExceptions.php @@ -594,7 +594,7 @@ class CrhExceptions { '/([' . Crh::C_CONS . '])Ё/u' => '$1Ö', # остальные вхождения о, у, ё, ю - # other occurences of о, у, ё, ю + # other occurrences of о, у, ё, ю '/Ё([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YO$1', '/Ю([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YU$1', diff --git a/includes/libs/XhprofData.php b/includes/libs/XhprofData.php index dee766ed23c9..2aa02e639f9b 100644 --- a/includes/libs/XhprofData.php +++ b/includes/libs/XhprofData.php @@ -144,7 +144,7 @@ class XhprofData { * called from that function during the measurement period. * * See getRawData() for a description of the metric that are returned for - * each funcition call. The values for the wt, cpu, mu and pmu metrics are + * each function call. The values for the wt, cpu, mu and pmu metrics are * arrays with these values: * - total: Cumulative value * - min: Minimum value diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 878a2eebe98a..52bce87d9253 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -846,7 +846,7 @@ class FSFileBackend extends FileBackendStore { /** * @param string $fsSrcPath Absolute file system path * @param string $fsDstPath Absolute file system path - * @param bool $ignoreMissing Whether to no-op if the source file is non-existant + * @param bool $ignoreMissing Whether to no-op if the source file is non-existent * @return string Command */ private function makeMoveCommand( $fsSrcPath, $fsDstPath, $ignoreMissing = false ) { @@ -867,7 +867,7 @@ class FSFileBackend extends FileBackendStore { /** * @param string $fsPath Absolute file system path - * @param bool $ignoreMissing Whether to no-op if the file is non-existant + * @param bool $ignoreMissing Whether to no-op if the file is non-existent * @return string Command */ private function makeUnlinkCommand( $fsPath, $ignoreMissing = false ) { diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index d25ad9e88900..11cf3ff473b4 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -1083,7 +1083,7 @@ class SwiftFileBackend extends FileBackendStore { 'mtime' => $this->convertSwiftDate( $object->last_modified, TS_MW ), 'size' => (int)$object->bytes, 'sha1' => null, - // Note: manifiest ETags are not an MD5 of the file + // Note: manifest ETags are not an MD5 of the file 'md5' => ctype_xdigit( $object->hash ) ? $object->hash : null, 'latest' => false // eventually consistent ]; @@ -1740,7 +1740,7 @@ class SwiftFileBackend extends FileBackendStore { // Empty objects actually return no content-length header in Ceph 'size' => isset( $rhdrs['content-length'] ) ? (int)$rhdrs['content-length'] : 0, 'sha1' => $metadata['sha1base36'] ?? null, - // Note: manifiest ETags are not an MD5 of the file + // Note: manifest ETags are not an MD5 of the file 'md5' => ctype_xdigit( $rhdrs['etag'] ) ? $rhdrs['etag'] : null, 'xattr' => [ 'metadata' => $metadata, 'headers' => $headers ] ]; diff --git a/includes/libs/objectcache/wancache/WANObjectCache.php b/includes/libs/objectcache/wancache/WANObjectCache.php index feeb42b2587f..e685503068ad 100644 --- a/includes/libs/objectcache/wancache/WANObjectCache.php +++ b/includes/libs/objectcache/wancache/WANObjectCache.php @@ -56,7 +56,7 @@ use Wikimedia\LightweightObjectStore\StorageAwareness; * database replication, to ensure deterministic values without oscillation. * - B) Validity is checked against the source after get(). * This is the inverse of A. The unique identifier is embedded inside the value - * and validated after on retreival. If outdated, the value is recomputed. + * and validated after on retrieval. If outdated, the value is recomputed. * - C) The value is cached with a modest TTL (without validation). * If value recomputation is reasonably performant, and the value is allowed to * be stale, one should consider using TTL only – using the value's age as @@ -152,7 +152,7 @@ class WANObjectCache implements protected $useInterimHoldOffCaching = true; /** @var float Unix timestamp of the oldest possible valid values */ protected $epoch; - /** @var string Stable secret used for hasing long strings into key components */ + /** @var string Stable secret used for hashing long strings into key components */ protected $secret; /** @var int Scheme to use for key coalescing (Hash Tags or Hash Stops) */ protected $coalesceScheme; @@ -770,7 +770,7 @@ class WANObjectCache implements * Default: WANObjectCache::STALE_TTL_NONE * - creating: Optimize for the case where the key does not already exist. * Default: false - * - version: Integer version number signifiying the format of the value. + * - version: Integer version number signifying the format of the value. * Default: null * - walltime: How long the value took to generate in seconds. Default: null * @phpcs:ignore Generic.Files.LineLength @@ -2196,7 +2196,7 @@ class WANObjectCache implements $id = $params['id']; if ( array_key_exists( $id, $newValsById ) ) { - // Value was already regerated as expected, so use the value in $newValsById + // Value was already regenerated as expected, so use the value in $newValsById $newValue = $newValsById[$id]; $ttl = $newTTLsById[$id]; $setOpts = $newSetOpts; @@ -2417,7 +2417,7 @@ class WANObjectCache implements * For use with getMultiWithSetCallback() and getMultiWithUnionSetCallback(). * * *Only* use this method if the entity ID/key mapping is trivially 1:1 without exception. - * Key generation method must utitilize the *full* entity ID in the key (not a hash of it). + * Key generation method must utilize the *full* entity ID in the key (not a hash of it). * * Example usage: * @code @@ -2910,7 +2910,7 @@ class WANObjectCache implements /** * @param array|string|false $wrapped The entry at a cache key (false if key is nonexistant) - * @param float $now Unix Current timestamp (preferrably pre-query) + * @param float $now Unix Current timestamp (preferably pre-query) * @return array<int,mixed> Result map/n-tuple that includes the following: * - WANObjectCache::RES_VALUE: value or false if absent/tombstoned/malformed * - WANObjectCache::KEY_VERSION: value version number; null if there is no value diff --git a/includes/libs/objectcache/wancache/WANObjectCacheReaper.php b/includes/libs/objectcache/wancache/WANObjectCacheReaper.php index 39a8d159ed17..0db01d50834a 100644 --- a/includes/libs/objectcache/wancache/WANObjectCacheReaper.php +++ b/includes/libs/objectcache/wancache/WANObjectCacheReaper.php @@ -60,7 +60,7 @@ class WANObjectCacheReaper implements LoggerAwareInterface { * - The ending position as a UNIX timestamp * - The maximum number of results to return * It returns a list of maps of (key: cache key, pos: UNIX timestamp, id: unique ID) - * for each key affected, with the corrosponding event timestamp/ID information. + * for each key affected, with the corresponding event timestamp/ID information. * The events should be in ascending order, by (timestamp,id). * @param callable $keyCallback Callback taking arguments: * - The WANObjectCache instance diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index b73fae1076e7..970abd517667 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -1308,7 +1308,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * - write callers * - last write time * - affected row count of the last write - * - whether writes occured in a transaction + * - whether writes occurred in a transaction * * This method does *not* handle DBO_TRX transaction logic *nor* query retries. * diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index caa47c864c60..1cfd40d0f933 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -643,7 +643,7 @@ abstract class DatabaseMysqlBase extends Database { protected function getApproximateLagStatus() { if ( $this->getLagDetectionMethod() === 'pt-heartbeat' ) { - // Disable caching since this is fast enough and we don't wan't + // Disable caching since this is fast enough and we don't want // to be *too* pessimistic by having both the cache TTL and the // pt-heartbeat interval count as lag in getSessionLagStatus() return parent::getApproximateLagStatus(); diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php index c10bb3031a5b..3af58cf5bbc4 100644 --- a/includes/libs/rdbms/database/IDatabase.php +++ b/includes/libs/rdbms/database/IDatabase.php @@ -903,7 +903,7 @@ interface IDatabase extends ISQLPlatform, DbQuoter { * @param array|string $conds Condition in the format of IDatabase::select() conditions. * In order to prevent possible performance or replication issues or damaging a data * accidentally, an empty condition for 'update' queries isn't allowed. - * IDatabase::ALL_ROWS should be passed explicitely in order to update all rows. + * IDatabase::ALL_ROWS should be passed explicitly in order to update all rows. * @param string $fname Calling function name (use __METHOD__) for logs/profiling * @param string|array $options Combination map/list where each string-keyed entry maps * a non-boolean option to the option parameters and each integer-keyed value is the diff --git a/includes/libs/rdbms/exception/DBQueryDisconnectedError.php b/includes/libs/rdbms/exception/DBQueryDisconnectedError.php index 63e71dd71218..b3c1721b6b83 100644 --- a/includes/libs/rdbms/exception/DBQueryDisconnectedError.php +++ b/includes/libs/rdbms/exception/DBQueryDisconnectedError.php @@ -35,7 +35,7 @@ class DBQueryDisconnectedError extends DBQueryError { * @param int|string $errno * @param string $sql * @param string $fname - * @param string|null $message Optional message, intended for subclases (optional) + * @param string|null $message Optional message, intended for subclasses (optional) */ public function __construct( IDatabase $db, $error, $errno, $sql, $fname, $message = null ) { if ( $message === null ) { diff --git a/includes/libs/rdbms/exception/DBQueryError.php b/includes/libs/rdbms/exception/DBQueryError.php index 5163c2a3359d..2a765ce19dca 100644 --- a/includes/libs/rdbms/exception/DBQueryError.php +++ b/includes/libs/rdbms/exception/DBQueryError.php @@ -43,7 +43,7 @@ class DBQueryError extends DBExpectedError { * @param int|string $errno * @param string $sql * @param string $fname - * @param string|null $message Optional message, intended for subclases (optional) + * @param string|null $message Optional message, intended for subclasses (optional) */ public function __construct( IDatabase $db, $error, $errno, $sql, $fname, $message = null ) { if ( $message === null ) { diff --git a/includes/libs/uuid/GlobalIdGenerator.php b/includes/libs/uuid/GlobalIdGenerator.php index 97243742f425..1ecff41e34af 100644 --- a/includes/libs/uuid/GlobalIdGenerator.php +++ b/includes/libs/uuid/GlobalIdGenerator.php @@ -705,7 +705,7 @@ class GlobalIdGenerator { * Delete all cache files that have been created (T46850) * * This is a cleanup method primarily meant to be used from unit tests to - * avoid poluting the local filesystem. If used outside of a unit test + * avoid polluting the local filesystem. If used outside of a unit test * environment it should be used with caution as it may destroy state saved * in the files. * diff --git a/includes/libs/virtualrest/VirtualRESTService.php b/includes/libs/virtualrest/VirtualRESTService.php index dc69b3517e80..c52a84f4d5ad 100644 --- a/includes/libs/virtualrest/VirtualRESTService.php +++ b/includes/libs/virtualrest/VirtualRESTService.php @@ -70,7 +70,7 @@ abstract class VirtualRESTService { * or added request, the 'response' array can be filled in, which will prevent the * client from executing it. If an original request is removed, at some point it * must be added back (with the same key) in onRequests() or onResponses(); - * it's reponse may be filled in as with other requests. + * its response may be filled in as with other requests. * * @param array[] $reqs Map of Virtual HTTP request arrays * @param Closure $idGeneratorFunc Method to generate unique keys for new requests @@ -102,7 +102,7 @@ abstract class VirtualRESTService { * or added request, the 'response' array can be filled in, which will prevent the * client from executing it. If an original request is removed, at some point it * must be added back (with the same key) in onRequests() or onResponses(); - * it's reponse may be filled in as with other requests. All requests added to $reqs + * its response may be filled in as with other requests. All requests added to $reqs * will be passed through onRequests() to handle any munging required as normal. * * The incoming URL parameter will be relative to the service mount point. diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php index 90750ae94a4d..4b756894baaf 100644 --- a/includes/logging/LogFormatter.php +++ b/includes/logging/LogFormatter.php @@ -565,7 +565,7 @@ class LogFormatter { } /** - * Formats parameters intented for action message from + * Formats parameters intended for action message from * array of all parameters. There are three hardcoded * parameters (array is zero-indexed, this list not): * - 1: user name with premade link diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index ef199c3c59cc..f87aef6a892e 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -312,7 +312,7 @@ class UserMailer { // escaping (e.g. due to spaces). MediaWiki's email sanitizer should generally // be good enough, but just in case, put in double quotes, and remove any // double quotes present (" is not allowed in emails, so should have no - // effect, although this might cause apostrophees to be double escaped) + // effect, although this might cause apostrophes to be double escaped) $returnPathCLI = '"' . str_replace( '"', '', $returnPath ) . '"'; $extraParams .= ' -f ' . $returnPathCLI; @@ -485,7 +485,7 @@ class UserMailer { /** * Strips bad characters from a header value to prevent PHP mail header injection attacks - * @param string $val String to be santizied + * @param string $val String to be sanitized * @return string */ public static function sanitizeHeaderValue( $val ) { diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 964c01454d27..ea6608838456 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -119,7 +119,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * * Parameters include: * - server: Server config map for Database::factory() that describes the database to - * use for all key operations in the current region. This is overriden by "servers". + * use for all key operations in the current region. This is overridden by "servers". * - servers: Map of tag strings to server config maps, each for Database::factory(), * describing the set of database servers on which to distribute key operations in the * current region. Data is distributed among the servers via key hashing based on the @@ -128,10 +128,10 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * in multiple regions (each having different hostnames). * - localKeyLB: ObjectFactory::getObjectFromSpec array yielding ILoadBalancer. * This load balancer is used for local keys, e.g. those using makeKey(). - * This is overriden by "server" and "servers". + * This is overridden by "server" and "servers". * - globalKeyLB: ObjectFactory::getObjectFromSpec array yielding ILoadBalancer. * This load balancer is used for global keys, e.g. those using makeGlobalKey(). - * This is overriden by "server" and "servers". + * This is overridden by "server" and "servers". * - globalKeyLbDomain: database name to use for "globalKeyLB" load balancer. * - multiPrimaryMode: Whether the portion of the dataset belonging to each tag/shard is * replicated among one or more regions, with one "co-primary" server in each region. @@ -654,7 +654,7 @@ class SqlBagOStuff extends MediumSpecificBagOStuff { * @param string $ptable Name of the partition table where the argument keys belong * @param float $mtime UNIX modification timestamp * @param array<string,array> $argsByKey Non-empty (key => (value,exptime)) map - * @param array<string,mixed> &$resByKey Map of (key => result) for succesful writes [returned] + * @param array<string,mixed> &$resByKey Map of (key => result) for successful writes [returned] * @throws DBError */ private function modifyTableSpecificBlobsForSet( diff --git a/includes/page/Article.php b/includes/page/Article.php index a1d68106d8f7..84f907e0e181 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -638,7 +638,7 @@ class Article implements Page { $this->getPage(), $parserOptions, $rev, - ParserOutputAccess::OPT_NO_AUDIENCE_CHECK // we already checked in fetchRevisionRevord + ParserOutputAccess::OPT_NO_AUDIENCE_CHECK // we already checked in fetchRevisionRecord ); if ( $pOutput ) { diff --git a/includes/page/DeletePage.php b/includes/page/DeletePage.php index 901f6dce28df..d83fdbbc4eec 100644 --- a/includes/page/DeletePage.php +++ b/includes/page/DeletePage.php @@ -599,7 +599,7 @@ class DeletePage { } $dbw->endAtomic( __METHOD__ ); if ( $dbw->explicitTrxActive() ) { - // Explict transactions may never happen here in practice. Log to be sure. + // Explicit transactions may never happen here in practice. Log to be sure. if ( !$explictTrxLogged ) { $explictTrxLogged = true; LoggerFactory::getInstance( 'wfDebug' )->debug( diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php index d6df2e105b85..3dc9fc6eb983 100644 --- a/includes/page/ImagePage.php +++ b/includes/page/ImagePage.php @@ -316,7 +316,7 @@ class ImagePage extends Article { } /** - * Returns language code to be used for dispaying the image, based on request context and + * Returns language code to be used for displaying the image, based on request context and * languages available in the file. * * @param WebRequest $request diff --git a/includes/page/UndeletePage.php b/includes/page/UndeletePage.php index 3a88b6f1c571..0dc4bb1f158d 100644 --- a/includes/page/UndeletePage.php +++ b/includes/page/UndeletePage.php @@ -159,7 +159,7 @@ class UndeletePage { } /** - * Whether to remove all ar_deleted/fa_deleted restrictions of seletected revs. + * Whether to remove all ar_deleted/fa_deleted restrictions of selected revs. * * @param bool $unsuppress * @return self For chaining @@ -225,7 +225,7 @@ class UndeletePage { } /** - * Wether to delete the associated talk page with the subject page + * Whether to delete the associated talk page with the subject page * * @param bool $undelete * @return self For chaining diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 344e849bc10b..0d28de456d18 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -1187,7 +1187,7 @@ class CoreParserFunctions { * * @param Parser $parser * @param Title $title - * @param string $vary ParserOuput vary-* flag + * @param string $vary ParserOutput vary-* flag * @return RevisionRecord|null * @since 1.23 */ diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 77fee682470b..2b0208bcd28f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5167,7 +5167,7 @@ class Parser { } # We need to get what handler the file uses, to figure out parameters. - # Note, a hook can overide the file name, and chose an entirely different + # Note, a hook can override the file name, and chose an entirely different # file (which potentially could be of a different type and have different handler). $options = []; $descQuery = false; diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 6788ca5ee4de..46dcb9cf13de 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -594,7 +594,7 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector { } /** - * Returns the class (or classes) to be used with the wrapper div for this otuput. + * Returns the class (or classes) to be used with the wrapper div for this output. * If there is no wrapper class given, no wrapper div should be added. * The wrapper div is added automatically by getText(). * @@ -1280,7 +1280,7 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector { } /** - * Accomodate very basic transcluding of a temporary OutputPage object into parser output. + * Accommodate very basic transcluding of a temporary OutputPage object into parser output. * * This is a fragile method that cannot be relied upon in any meaningful way. * It exists solely to support the wikitext feature of transcluding a SpecialPage, and diff --git a/includes/preferences/DefaultPreferencesFactory.php b/includes/preferences/DefaultPreferencesFactory.php index 6841d9a707e0..44ab64e9cc0a 100644 --- a/includes/preferences/DefaultPreferencesFactory.php +++ b/includes/preferences/DefaultPreferencesFactory.php @@ -263,7 +263,7 @@ class DefaultPreferencesFactory implements PreferencesFactory { } /** - * Simplify form descriptor for vaidation or something similar. + * Simplify form descriptor for validation or something similar. * * @param array $descriptor HTML form descriptor. * @return array @@ -285,7 +285,7 @@ class DefaultPreferencesFactory implements PreferencesFactory { // Special case, should be kept. case 'options-message': break; - // Special case, should be transfered. + // Special case, should be transferred. case 'options-messages': unset( $params[$key] ); $params['options'] = $value; diff --git a/includes/search/PrefixSearch.php b/includes/search/PrefixSearch.php index 5d0a40f90a5e..c7597e2fa17b 100644 --- a/includes/search/PrefixSearch.php +++ b/includes/search/PrefixSearch.php @@ -137,7 +137,7 @@ abstract class PrefixSearch { if ( $offset === 0 ) { // Only perform exact db match if offset === 0 // This is still far from perfect but at least we avoid returning the - // same title afain and again when the user is scrolling with a query + // same title again and again when the user is scrolling with a query // that matches a title in the db. $rescorer = new SearchExactMatchRescorer(); $srchres = $rescorer->rescore( $search, $namespaces, $srchres, $limit ); diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 8f272f41db9a..ab0e466ee7d8 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1001,13 +1001,13 @@ abstract class Skin extends ContextSource { * return an HTML link for use in the footer. * * @param string $desc The i18n message key for the link text. - * The content of this message will be the visibile text label. + * The content of this message will be the visible text label. * If this is set to nonexisting message key or the message is * disabled, the link will not be generated, empty string will * be returned in the stead. * @param string $page The i18n message key for the page to link to. * The content of this message will be the destination page for - * the footer link. Given a messsage key 'Privacypage' with content + * the footer link. Given a message key 'Privacypage' with content * 'Project:Privacy policy', the link will lead to the wiki page with * the title of the content. * diff --git a/includes/skins/components/SkinComponent.php b/includes/skins/components/SkinComponent.php index d3551d7340a4..bedd67012e3f 100644 --- a/includes/skins/components/SkinComponent.php +++ b/includes/skins/components/SkinComponent.php @@ -25,7 +25,7 @@ namespace MediaWiki\Skin; interface SkinComponent { /** * This returns all the data that is needed to the component. - * Returned array must be seralized. This will be passed directly + * Returned array must be serialized. This will be passed directly * to a template (usually Mustache) for rendering. * * @return array Data related to component required to render. diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index a8fe72444d75..be64b612a702 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1094,9 +1094,9 @@ abstract class ChangesListSpecialPage extends SpecialPage { /** * Get a FormOptions object containing the default options. By default, returns - * some basic options. The filters listed explicitly here are overriden in this + * some basic options. The filters listed explicitly here are overridden in this * method, in subclasses, but most filters (e.g. hideminor, userExpLevel filters, - * and more) are structured. Structured filters are overriden in registerFilters. + * and more) are structured. Structured filters are overridden in registerFilters. * not here. * * @return FormOptions diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index a02056b2b03b..e8fbf672a294 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -265,7 +265,7 @@ class SpecialPage implements MessageLocalizer { * * @note If cache time is not 0, then the current user becomes an anon * if you want to do any per-user customizations, than this method - * must be overriden to return 0. + * must be overridden to return 0. * @since 1.26 * @stable to override * @return int Time in seconds, 0 to disable caching altogether, diff --git a/includes/specialpage/WantedQueryPage.php b/includes/specialpage/WantedQueryPage.php index 7368b82ba9f6..96cf10e70aa8 100644 --- a/includes/specialpage/WantedQueryPage.php +++ b/includes/specialpage/WantedQueryPage.php @@ -137,7 +137,7 @@ abstract class WantedQueryPage extends QueryPage { /** * Do not order descending for all order fields. We will use DESC only on one field, see * getOrderFields above. This overwrites sortDescending from QueryPage::getOrderFields(). - * Do NOT change this to true unless you remove the phrase DESC in getOrderFiels above. + * Do NOT change this to true unless you remove the phrase DESC in getOrderFields above. * If you do a database error will be thrown due to double adding DESC to query! * * @stable to override diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index 48b4444426ee..97db7ec8301f 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -320,7 +320,7 @@ class SpecialMediaStatistics extends QueryPage { [], // for grep: // mediastatistics-table-mimetype, mediastatistics-table-extensions - // tatistics-table-count, mediastatistics-table-totalbytes + // mediastatistics-table-count, mediastatistics-table-totalbytes $this->msg( 'mediastatistics-table-' . $header )->parse() ); } diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index f6f302165707..98acd87122d2 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -86,7 +86,7 @@ class SpecialStatistics extends SpecialPage { * Format a row * @param string $text Description of the row * @param float|string $number A statistical number - * @param array $trExtraParams Params to table row, see Html::elememt + * @param array $trExtraParams Params to table row, see Html::element * @param string $descMsg Message key * @param array|string $descMsgParam Message parameters * @return string Table row in HTML format diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 5d4cbacd968b..76d313c10d5f 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -134,7 +134,7 @@ class SpecialTags extends SpecialPage { // List all defined tags, even if they were never applied $definedTags = array_keys( $this->explicitlyDefinedTags + $this->softwareDefinedTags ); - // Show header only if there exists atleast one tag + // Show header only if there exists at least one tag if ( !$tagStats && !$definedTags ) { return; } diff --git a/includes/specials/SpecialUnwatchedPages.php b/includes/specials/SpecialUnwatchedPages.php index 9314af0e46d6..0945d362db3c 100644 --- a/includes/specials/SpecialUnwatchedPages.php +++ b/includes/specials/SpecialUnwatchedPages.php @@ -31,7 +31,7 @@ use Wikimedia\Rdbms\ILoadBalancer; use Wikimedia\Rdbms\IResultWrapper; /** - * A special page that displays a list of pages that are not on anyones watchlist. + * A special page that displays a list of pages that are not on anyone's watchlist. * * @ingroup SpecialPage */ diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 2ede53e96f76..0ebb29e2a6d2 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -287,7 +287,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { $hideLiu = $registration->getFilter( 'hideliu' ); $hideLiu->setDefault( $this->userOptionsLookup->getBoolOption( $user, 'watchlisthideliu' ) ); - // Selecting both hideanons and hideliu on watchlist preferances + // Selecting both hideanons and hideliu on watchlist preferences // gives mutually exclusive filters, so those are ignored if ( $this->userOptionsLookup->getBoolOption( $user, 'watchlisthideanons' ) && !$this->userOptionsLookup->getBoolOption( $user, 'watchlisthideliu' ) diff --git a/includes/specials/forms/UploadForm.php b/includes/specials/forms/UploadForm.php index 461255ef8453..c89d8705e1ee 100644 --- a/includes/specials/forms/UploadForm.php +++ b/includes/specials/forms/UploadForm.php @@ -237,7 +237,7 @@ class UploadForm extends HTMLForm { } /** - * Get the messages indicating which extensions are preferred and prohibitted. + * Get the messages indicating which extensions are preferred and prohibited. * * @return string HTML string containing the message */ diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 5a3d82317e91..7c92ed3c56f8 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1841,7 +1841,7 @@ abstract class UploadBase { } /** - * Divide the element name passed by the xml parser to the callback into URI and prifix. + * Divide the element name passed by the xml parser to the callback into URI and prefix. * @param string $element * @return array Containing the namespace URI and prefix */ @@ -1939,7 +1939,7 @@ abstract class UploadBase { ? wfMessage( 'virus-scanfailed', [ $exitCode ] )->text() : null; } elseif ( $mappedCode === AV_SCAN_ABORTED ) { - # scan failed because filetype is unknown (probably imune) + # scan failed because filetype is unknown (probably immune) wfDebug( __METHOD__ . ": unsupported file type $file (code $exitCode)." ); $output = null; } elseif ( $mappedCode === AV_NO_VIRUS ) { diff --git a/includes/user/Hook/UserAddGroupHook.php b/includes/user/Hook/UserAddGroupHook.php index 5d004468b366..8b2a05b72801 100644 --- a/includes/user/Hook/UserAddGroupHook.php +++ b/includes/user/Hook/UserAddGroupHook.php @@ -13,7 +13,7 @@ use User; */ interface UserAddGroupHook { /** - * This hook is alled when adding a group or changing a group's expiry. + * This hook is called when adding a group or changing a group's expiry. * * @since 1.35 * diff --git a/includes/user/StaticUserOptionsLookup.php b/includes/user/StaticUserOptionsLookup.php index ef2e67301c4c..926ccd1ec36c 100644 --- a/includes/user/StaticUserOptionsLookup.php +++ b/includes/user/StaticUserOptionsLookup.php @@ -4,7 +4,7 @@ namespace MediaWiki\User; /** * A UserOptionsLookup that's just an array. Useful for testing and creating staging environments. - * Note that unlike UserOptionsManager, no attempt is made to canonincalize user names. + * Note that unlike UserOptionsManager, no attempt is made to canonicalize user names. * @since 1.36 */ class StaticUserOptionsLookup extends UserOptionsLookup { diff --git a/includes/user/User.php b/includes/user/User.php index 6f43e5645a63..9839e8ef4b77 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1313,7 +1313,7 @@ class User implements Authority, UserIdentity, UserEmailContact { */ protected function makeUpdateConditions( IDatabase $db, array $conditions ) { if ( $this->mTouched ) { - // CAS check: only update if the row wasn't changed sicne it was loaded. + // CAS check: only update if the row wasn't changed since it was loaded. $conditions['user_touched'] = $db->timestamp( $this->mTouched ); } @@ -1715,7 +1715,7 @@ class User implements Authority, UserIdentity, UserEmailContact { * Check if user is blocked * * @deprecated since 1.34, use User::getBlock() or - * Authority:getBlock() or Authority:definitlyCan() or + * Authority:getBlock() or Authority:definitelyCan() or * Authority:authorizeRead() or Authority:authorizeWrite() or * PermissionManager::isBlockedFrom(), as appropriate. * @@ -3505,7 +3505,7 @@ class User implements Authority, UserIdentity, UserEmailContact { * Get the permissions associated with a given list of groups * * @deprecated since 1.34, use GroupPermissionsLookup::getGroupPermissions() instead in 1.36+, - * or PermissionManager::getGroupPermisions() in 1.34 and 1.35 + * or PermissionManager::getGroupPermissions() in 1.34 and 1.35 * * @param string[] $groups internal group names * @return string[] permission key names for given groups combined diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 5d146b32b6c3..1405f9f60005 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -160,7 +160,7 @@ class AutoloadGenerator { */ public function readFile( $inputPath ) { // NOTE: do NOT expand $inputPath using realpath(). It is perfectly - // reasonable for LocalSettings.php and similiar files to be symlinks + // reasonable for LocalSettings.php and similar files to be symlinks // to files that are outside of $this->basepath. $inputPath = self::normalizePathSeparator( $inputPath ); $len = strlen( $this->basepath ); diff --git a/includes/watcheditem/WatchedItemQueryService.php b/includes/watcheditem/WatchedItemQueryService.php index d7442e1a6eba..235018e3f18c 100644 --- a/includes/watcheditem/WatchedItemQueryService.php +++ b/includes/watcheditem/WatchedItemQueryService.php @@ -131,7 +131,7 @@ class WatchedItemQueryService { * (defaults to all types), allowed values: RC_EDIT, RC_NEW, * RC_LOG, RC_EXTERNAL, RC_CATEGORIZE * 'onlyByUser' => string only list changes by a specified user - * 'notByUser' => string do not incluide changes by a specified user + * 'notByUser' => string do not include changes by a specified user * 'dir' => string in which direction to enumerate, accepted values: * - DIR_OLDER list newest first * - DIR_NEWER list oldest first @@ -282,7 +282,7 @@ class WatchedItemQueryService { * one of the self::SORT_* constants * 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) * 'limit' => int maximum number of items to return - * 'filter' => string optional filter, one of the self::FILTER_* contants + * 'filter' => string optional filter, one of the self::FILTER_* constants * 'from' => LinkTarget requires 'sort' key, only return items starting from * those related to the link target * 'until' => LinkTarget requires 'sort' key, only return items until diff --git a/includes/watcheditem/WatchedItemStoreInterface.php b/includes/watcheditem/WatchedItemStoreInterface.php index 4904aad78818..8fb669bda67d 100644 --- a/includes/watcheditem/WatchedItemStoreInterface.php +++ b/includes/watcheditem/WatchedItemStoreInterface.php @@ -262,7 +262,7 @@ interface WatchedItemStoreInterface { ); /** - * Reset all watchlist notificaton timestamps for a user using the job queue + * Reset all watchlist notification timestamps for a user using the job queue * * @since 1.31 * diff --git a/includes/watchlist/WatchlistManager.php b/includes/watchlist/WatchlistManager.php index fdae6f6adbb2..1ba3b102f72d 100644 --- a/includes/watchlist/WatchlistManager.php +++ b/includes/watchlist/WatchlistManager.php @@ -501,7 +501,7 @@ class WatchlistManager { return StatusValue::newGood(); } - // Only call addWatchhIgnoringRights() or removeWatch() if there's been a change in the watched status. + // Only call addWatchIgnoringRights() or removeWatch() if there's been a change in the watched status. $link = TitleValue::newFromPage( $target ); $oldWatchedItem = $this->watchedItemStore->getWatchedItem( $performer->getUser(), $link ); $changingWatchStatus = (bool)$oldWatchedItem !== $watch; diff --git a/includes/widget/SizeFilterWidget.php b/includes/widget/SizeFilterWidget.php index d41e5c4c7c06..6af2ecda2b6e 100644 --- a/includes/widget/SizeFilterWidget.php +++ b/includes/widget/SizeFilterWidget.php @@ -28,7 +28,7 @@ class SizeFilterWidget extends \OOUI\Widget { * @param array $config Configuration options * - array $config['textinput'] Configuration for the TextInputWidget * - array $config['radioselectinput'] Configuration for the RadioSelectWidget - * - bool $congif['selectMin'] Whether to select 'min', false would select 'max' + * - bool $config['selectMin'] Whether to select 'min', false would select 'max' */ public function __construct( array $config = [] ) { // Configuration initialization diff --git a/includes/xml/Xml.php b/includes/xml/Xml.php index 1ea4455d993a..418256bab64a 100644 --- a/includes/xml/Xml.php +++ b/includes/xml/Xml.php @@ -479,7 +479,7 @@ class Xml { if ( $useMediaWikiUIEverywhere ) { $baseAttrs['class'] = 'mw-ui-button mw-ui-progressive'; } - // Any custom attributes will take precendence of anything in baseAttrs e.g. override the class + // Any custom attributes will take precedence of anything in baseAttrs e.g. override the class $attribs += $baseAttrs; return Html::element( 'input', $attribs ); } diff --git a/maintenance/compareParsers.php b/maintenance/compareParsers.php index 3fbad9fe84f2..fc355bff5e8b 100644 --- a/maintenance/compareParsers.php +++ b/maintenance/compareParsers.php @@ -184,7 +184,7 @@ class CompareParsers extends DumpIterator { } private static function checkParserLocally( $parserName ) { - /* Look for the parser in a file appropiately named in the current folder */ + /* Look for the parser in a file appropriately named in the current folder */ if ( !class_exists( $parserName ) && file_exists( "$parserName.php" ) ) { global $wgAutoloadClasses; $wgAutoloadClasses[$parserName] = realpath( '.' ) . "/$parserName.php"; diff --git a/maintenance/deleteDefaultMessages.php b/maintenance/deleteDefaultMessages.php index d774ac74cb0f..df558f3066fe 100644 --- a/maintenance/deleteDefaultMessages.php +++ b/maintenance/deleteDefaultMessages.php @@ -77,7 +77,7 @@ class DeleteDefaultMessages extends Maintenance { return; } - // Deletions will be made by $user temporarly added to the bot group + // Deletions will be made by $user temporarily added to the bot group // in order to hide it in RecentChanges. $user = User::newSystemUser( 'MediaWiki default', [ 'steal' => true ] ); if ( !$user ) { diff --git a/maintenance/deleteTag.php b/maintenance/deleteTag.php index 9feaf959e4d2..f86d6a494536 100644 --- a/maintenance/deleteTag.php +++ b/maintenance/deleteTag.php @@ -40,7 +40,7 @@ class DeleteTag extends Maintenance { $this->output( "Deleting tag '$tag'...\n" ); - // Make the tag imposssible to add by users while we're deleting it and drop the + // Make the tag impossible to add by users while we're deleting it and drop the // usage counter to zero $dbw->update( 'change_tag_def', diff --git a/maintenance/dev/includes/router.php b/maintenance/dev/includes/router.php index 152d8eb5fd3b..36e0f80cdcce 100644 --- a/maintenance/dev/includes/router.php +++ b/maintenance/dev/includes/router.php @@ -50,7 +50,7 @@ if ( $ext == 'php' ) { // Let built-in server handle script inclusion. return false; } else { - // Serve static file with appropiate Content-Type headers. + // Serve static file with appropriate Content-Type headers. // The built-in server for PHP 7.0+ supports most files already // (contrary to PHP 5.2, which was supported when router.php was created). // But it still doesn't support as many MIME types as MediaWiki (e.g. ".json") diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index e8a74f4221bc..94d88225feb5 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -34,7 +34,7 @@ use MediaWiki\Settings\SettingsBuilder; require_once __DIR__ . '/Maintenance.php'; /** - * Base class for interating over a dump. + * Base class for iterating over a dump. * * @ingroup Maintenance */ diff --git a/maintenance/eval.php b/maintenance/eval.php index 4a1dcd1cd21b..de65760ddf5c 100644 --- a/maintenance/eval.php +++ b/maintenance/eval.php @@ -71,7 +71,7 @@ while ( ( $__line = Maintenance::readconsole() ) !== false ) { // Internal state may be corrupted or fatals may occur later due // to some object not being set. Don't drop out of eval in case // lines were being pasted in (which would then get dumped to the shell). - // Instead, just absorb the remaning commands. Let "exit" through per DWIM. + // Instead, just absorb the remaining commands. Let "exit" through per DWIM. echo "Exception was thrown before; please restart eval.php\n"; continue; } diff --git a/maintenance/fixExtLinksProtocolRelative.php b/maintenance/fixExtLinksProtocolRelative.php index 00fa99647935..205eede81552 100644 --- a/maintenance/fixExtLinksProtocolRelative.php +++ b/maintenance/fixExtLinksProtocolRelative.php @@ -28,7 +28,7 @@ require_once __DIR__ . '/Maintenance.php'; use MediaWiki\MediaWikiServices; /** - * Maintenance script that fixes any entriy for protocol-relative URLs + * Maintenance script that fixes any entry for protocol-relative URLs * in the externallinks table. * * @ingroup Maintenance diff --git a/maintenance/fixMergeHistoryCorruption.php b/maintenance/fixMergeHistoryCorruption.php index ef2d7bb259fd..c89580555ac2 100644 --- a/maintenance/fixMergeHistoryCorruption.php +++ b/maintenance/fixMergeHistoryCorruption.php @@ -25,7 +25,7 @@ require_once __DIR__ . '/Maintenance.php'; * Maintenance script that clears rows of pages corrupted by MergeHistory, those * pages 'exist' but have no visible revision. * - * These pages are completely inacessible via the UI due to revision/title mismatch + * These pages are completely inaccessible via the UI due to revision/title mismatch * exceptions in RevisionStore and elsewhere. * * These are rows in page_table that have 'page_latest' entry with corresponding diff --git a/maintenance/importImages.php b/maintenance/importImages.php index 6b3c13d142ef..83038c1705c5 100644 --- a/maintenance/importImages.php +++ b/maintenance/importImages.php @@ -461,7 +461,7 @@ class ImportImages extends Maintenance { } /** - * Find an auxilliary file with the given extension, matching + * Find an auxiliary file with the given extension, matching * the give base file path. $maxStrip determines how many extensions * may be stripped from the original file name before appending the * new extension. For example, with $maxStrip = 1 (the default), diff --git a/maintenance/includes/TextPassDumper.php b/maintenance/includes/TextPassDumper.php index 92ae1b7fdf8d..f2f7f3f708ee 100644 --- a/maintenance/includes/TextPassDumper.php +++ b/maintenance/includes/TextPassDumper.php @@ -722,7 +722,7 @@ TEXT } } - // Retirieving a good text for $id failed (at least) maxFailures times. + // Retrieving a good text for $id failed (at least) maxFailures times. // We abort for this $id. // Restoring the consecutive failures, and maybe aborting, if the dump diff --git a/maintenance/language/generateUcfirstOverrides.php b/maintenance/language/generateUcfirstOverrides.php index 34f4f000f925..b4c2d71a7645 100644 --- a/maintenance/language/generateUcfirstOverrides.php +++ b/maintenance/language/generateUcfirstOverrides.php @@ -1,6 +1,6 @@ <?php /** - * Generate a php file containg an array of + * Generate a php file containing an array of * utf8_lowercase => utf8_uppercase * overrides. Takes as input two json files generated with generateUpperCharTable.php * as input. diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index aba9d920a56c..5470ebac12d2 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -100,7 +100,7 @@ class MWDocGen extends Maintenance { $this->input = ''; $inputs = explode( ',', $this->getOption( 'file', '' ) ); foreach ( $inputs as $input ) { - # Doxygen inputs are space separted and double quoted + # Doxygen inputs are space separated and double quoted $this->input .= " \"$IP/$input\""; } diff --git a/tests/phpunit/includes/api/ApiBaseTest.php b/tests/phpunit/includes/api/ApiBaseTest.php index c334fcfea288..9126297b7e7c 100644 --- a/tests/phpunit/includes/api/ApiBaseTest.php +++ b/tests/phpunit/includes/api/ApiBaseTest.php @@ -45,7 +45,7 @@ class ApiBaseTest extends ApiTestCase { [ null, 'getModuleManager' ], [ null, 'getCustomPrinter' ], [ [], 'getHelpUrls' ], - // @todo This is actually overriden by MockApi + // @todo This is actually overridden by MockApi // [ [], 'getAllowedParams' ], [ true, 'shouldCheckMaxLag' ], [ true, 'isReadMode' ], diff --git a/tests/phpunit/includes/specials/SpecialWatchlistTest.php b/tests/phpunit/includes/specials/SpecialWatchlistTest.php index 6f5ee297fb9c..22cce8557024 100644 --- a/tests/phpunit/includes/specials/SpecialWatchlistTest.php +++ b/tests/phpunit/includes/specials/SpecialWatchlistTest.php @@ -148,14 +148,14 @@ class SpecialWatchlistTest extends SpecialPageTestBase { ], ], - 'first two same as prefs, second two overriden' => [ + 'first two same as prefs, second two overridden' => [ 'expectedValuesDefaults' => 'wikiDefaults', 'expectedValues' => [ // First two same as prefs 'hideminor' => true, 'hidebots' => false, - // Second two overriden + // Second two overridden 'hideanons' => false, 'hideliu' => true, 'userExpLevel' => 'registered' diff --git a/tests/phpunit/mocks/content/DummyContentForTesting.php b/tests/phpunit/mocks/content/DummyContentForTesting.php index 3a4c54a92b83..e0465e1dabc6 100644 --- a/tests/phpunit/mocks/content/DummyContentForTesting.php +++ b/tests/phpunit/mocks/content/DummyContentForTesting.php @@ -43,7 +43,7 @@ class DummyContentForTesting extends AbstractContent { } /** - * Returns native represenation of the data. Interpretation depends on the data model used, + * Returns native representation of the data. Interpretation depends on the data model used, * as given by getDataModel(). * * @return mixed The native representation of the content. Could be a string, a nested array @@ -70,7 +70,7 @@ class DummyContentForTesting extends AbstractContent { * * $original->getModel() === $copy->getModel() * * $original->equals( $copy ) * - * If and only if the Content object is imutable, the copy() method can and should + * If and only if the Content object is immutable, the copy() method can and should * return $this. That is, $copy === $original may be true, but only for imutable content * objects. * diff --git a/tests/phpunit/mocks/content/DummyNonTextContent.php b/tests/phpunit/mocks/content/DummyNonTextContent.php index 68eab368e38e..9c3f177096e9 100644 --- a/tests/phpunit/mocks/content/DummyNonTextContent.php +++ b/tests/phpunit/mocks/content/DummyNonTextContent.php @@ -41,7 +41,7 @@ class DummyNonTextContent extends AbstractContent { } /** - * Returns native represenation of the data. Interpretation depends on the data model used, + * Returns native representation of the data. Interpretation depends on the data model used, * as given by getDataModel(). * * @return mixed The native representation of the content. Could be a string, a nested array @@ -68,7 +68,7 @@ class DummyNonTextContent extends AbstractContent { * * $original->getModel() === $copy->getModel() * * $original->equals( $copy ) * - * If and only if the Content object is imutable, the copy() method can and should + * If and only if the Content object is immutable, the copy() method can and should * return $this. That is, $copy === $original may be true, but only for imutable content * objects. * |