diff options
author | jenkins-bot <jenkins-bot@gerrit.wikimedia.org> | 2021-12-30 14:42:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@wikimedia.org> | 2021-12-30 14:42:56 +0000 |
commit | a498712d6bdb5238120e3f869fa4cb23d0761845 (patch) | |
tree | 2f548c21b17a0cb43838eb93f886238c53fa0cd2 | |
parent | e31bd424cbecc6d05246a9aff72caed57c943f24 (diff) | |
parent | 191cadb6a5cc8ac7873a914e68c79bdf0e542f8f (diff) |
Merge "Fix typos in comments (C-D)"
-rw-r--r-- | includes/ContentSecurityPolicy.php | 2 | ||||
-rw-r--r-- | includes/Storage/DerivedPageDataUpdater.php | 2 | ||||
-rw-r--r-- | includes/changes/ChangesList.php | 6 | ||||
-rw-r--r-- | includes/changes/ChangesListStringOptionsFilterGroup.php | 2 | ||||
-rw-r--r-- | includes/content/ContentHandler.php | 2 | ||||
-rw-r--r-- | includes/diff/DifferenceEngine.php | 4 | ||||
-rw-r--r-- | includes/installer/DatabaseUpdater.php | 2 | ||||
-rw-r--r-- | includes/libs/CryptHKDF.php | 4 | ||||
-rw-r--r-- | includes/libs/composer/ComposerJson.php | 2 | ||||
-rw-r--r-- | includes/libs/rdbms/ChronologyProtector.php | 6 | ||||
-rw-r--r-- | includes/libs/rdbms/database/Database.php | 12 | ||||
-rw-r--r-- | includes/libs/rdbms/database/DatabaseMysqlBase.php | 2 | ||||
-rw-r--r-- | includes/libs/rdbms/database/DatabasePostgres.php | 4 | ||||
-rw-r--r-- | includes/libs/rdbms/database/DatabaseSqlite.php | 2 | ||||
-rw-r--r-- | includes/specials/pagers/ContribsPager.php | 2 | ||||
-rw-r--r-- | includes/utils/ClassCollector.php | 2 |
16 files changed, 28 insertions, 28 deletions
diff --git a/includes/ContentSecurityPolicy.php b/includes/ContentSecurityPolicy.php index a0e8c1b828e6..9e0336e5b9b0 100644 --- a/includes/ContentSecurityPolicy.php +++ b/includes/ContentSecurityPolicy.php @@ -235,7 +235,7 @@ class ContentSecurityPolicy { $reportUri = $this->getReportUri( $mode ); } - // Only send an img-src, if we're sending a restricitve default. + // Only send an img-src, if we're sending a restrictive default. if ( !is_array( $defaultSrc ) || !in_array( '*', $defaultSrc ) || !in_array( 'data:', $defaultSrc ) diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php index 1fe686d90f17..1ff1fee40fc7 100644 --- a/includes/Storage/DerivedPageDataUpdater.php +++ b/includes/Storage/DerivedPageDataUpdater.php @@ -1409,7 +1409,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface, P $wikiPage = $this->getWikiPage(); $wikiPage->loadPageData( WikiPage::READ_LATEST ); if ( !$wikiPage->exists() ) { - // page deleted while defering the update + // page deleted while deferring the update return []; } diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 62082079e978..c8043187da12 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -287,7 +287,7 @@ class ChangesList extends ContextSource { $context = $context ?: RequestContext::getMain(); - // Inconsistent naming, kepted for b/c + // Inconsistent naming, kept for b/c if ( isset( $map[$flag] ) ) { $flag = $map[$flag]; } @@ -638,7 +638,7 @@ class ChangesList extends ContextSource { */ public function getTimestamp( $rc ) { // This uses the semi-colon separator unless there's a watchlist expiry date for the entry, - // because in that case the timestamp is preceeded by a clock icon. + // because in that case the timestamp is preceded by a clock icon. // A space is important after mw-changeslist-separator--semicolon to make sure // that whatever comes before it is distinguishable. // (Otherwise your have the text of titles pushing up against the timestamp) @@ -684,7 +684,7 @@ class ChangesList extends ContextSource { $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'], false, 0, null, - // The text content of tools is not wrapped with parenthesises or "piped". + // The text content of tools is not wrapped with parentheses or "piped". // This will be handled in CSS (T205581). false ); diff --git a/includes/changes/ChangesListStringOptionsFilterGroup.php b/includes/changes/ChangesListStringOptionsFilterGroup.php index 96ab3710f569..d5ea280e2b23 100644 --- a/includes/changes/ChangesListStringOptionsFilterGroup.php +++ b/includes/changes/ChangesListStringOptionsFilterGroup.php @@ -59,7 +59,7 @@ class ChangesListStringOptionsFilterGroup extends ChangesListFilterGroup { public const NONE = ''; /** - * Defaul parameter value + * Default parameter value * * @var string */ diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index e966fb9d1732..1a77121b45d1 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -669,7 +669,7 @@ abstract class ContentHandler { */ protected function getSlotDiffRendererWithOptions( IContextSource $context, $options = [] ) { $internalRenderer = $this->getSlotDiffRendererInternal( $context ); - // `getSlotDiffRendererInternal` has been overriden by a class using the deprecated method. + // `getSlotDiffRendererInternal` has been overridden by a class using the deprecated method. // Options will not work so exit early! if ( $internalRenderer !== null ) { return $internalRenderer; diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 40cd7e0270f3..df4cc29c6e99 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -46,7 +46,7 @@ use MediaWiki\Storage\NameTableAccessException; * That might change after PageTypeHandler gets introduced. * * In the past, the class was also used for slot-level diff generation, and extensions might still - * subclass it and add such functionality. When that is the case (sepcifically, when a + * subclass it and add such functionality. When that is the case (specifically, when a * ContentHandler returns a standard SlotDiffRenderer but a nonstandard DifferenceEngine) * DifferenceEngineSlotDiffRenderer will be used to convert the old behavior into the new one. * @@ -162,7 +162,7 @@ class DifferenceEngine extends ContextSource { * If the content was overridden, most internal state (e.g. mOldid or mOldRev) should be ignored * and only mOldContent and mNewContent is reliable. * (Note that setRevisions() does not set this flag as in that case all properties are - * overriden and remain consistent with each other, so no special handling is needed.) + * overridden and remain consistent with each other, so no special handling is needed.) * @var bool */ protected $isContentOverridden = false; diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 01536cab20c0..ff7faca5188d 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -1090,7 +1090,7 @@ abstract class DatabaseUpdater { } /** - * Set any .htaccess files or equivilent for storage repos + * Set any .htaccess files or equivalent for storage repos * * Some zones (e.g. "temp") used to be public and may have been initialized as such */ diff --git a/includes/libs/CryptHKDF.php b/includes/libs/CryptHKDF.php index dfaf276deb65..80e4aa0b79f6 100644 --- a/includes/libs/CryptHKDF.php +++ b/includes/libs/CryptHKDF.php @@ -1,6 +1,6 @@ <?php /** - * Extract-and-Expand Key Derivation Function (HKDF). A cryptographicly + * Extract-and-Expand Key Derivation Function (HKDF). A cryptographically * secure key expansion function based on RFC 5869. * * This relies on the secrecy of $wgSecretKey (by default), or $wgHKDFSecret. @@ -187,7 +187,7 @@ class CryptHKDF { * RFC5869 defines HKDF in 2 steps, extraction and expansion. * From http://eprint.iacr.org/2010/264.pdf: * - * The scheme HKDF is specifed as: + * The scheme HKDF is specified as: * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t) * where the values K(i) are defined as follows: * PRK = HMAC(XTS, SKM) diff --git a/includes/libs/composer/ComposerJson.php b/includes/libs/composer/ComposerJson.php index 73225b61292f..8772a0c53b81 100644 --- a/includes/libs/composer/ComposerJson.php +++ b/includes/libs/composer/ComposerJson.php @@ -28,7 +28,7 @@ class ComposerJson { $deps = []; if ( isset( $this->contents['require'] ) ) { foreach ( $this->contents['require'] as $package => $version ) { - // Examples of package dependancies that don't have a / in the name: + // Examples of package dependencies that don't have a / in the name: // php, ext-xml, composer-plugin-api if ( strpos( $package, '/' ) !== false ) { $deps[$package] = self::normalizeVersion( $version ); diff --git a/includes/libs/rdbms/ChronologyProtector.php b/includes/libs/rdbms/ChronologyProtector.php index da7c1016c3c5..fbc355fb2c23 100644 --- a/includes/libs/rdbms/ChronologyProtector.php +++ b/includes/libs/rdbms/ChronologyProtector.php @@ -36,7 +36,7 @@ use Wikimedia\WaitConditionLoop; * * This class tries to hide visible effects of database lag. It does this by temporarily remembering * the database positions after a client makes a write, and on their next web request we will prefer - * non-lagged database replicas. When replica connections are establshed, we wait up to a few seconds + * non-lagged database replicas. When replica connections are established, we wait up to a few seconds * for sufficient replication to have occurred, if they were not yet caught up to that same point. * * This ensures a consistent ordering of events as seen by a client. Kind of like Hawking's @@ -98,11 +98,11 @@ use Wikimedia\WaitConditionLoop; * of one millisecond. * - Best effort persistence, without active eviction pressure. Data stored here cannot be * obtained elsewhere or recomputed. As such, under normal operating conditions, this store - * should not be full, and should not evict values before their intended expiry time ellapsed. + * should not be full, and should not evict values before their intended expiry time elapsed. * - No replication, local consistency. Each DC may have a fully independent dc-local store * associated with ChronologyProtector (no replication across DCs is needed). Local writes * must be immediately reflected in subsequent local reads. No intra-dc read lag is allowed. - * - No redundancy, fast failure. Loss of data will likely be noticable and disruptive to + * - No redundancy, fast failure. Loss of data will likely be noticeable and disruptive to * clients, but the data is not considered essential. Under maintenance or unprecedented load, * it is recommended to lose some data, instead of compromising other requirements such as * latency or availability for new writes. The fallback is that users may be temporary diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 4927519b085a..96ab0329fcc5 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -85,7 +85,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware protected $user; /** @var string|null Password used to establish the current connection */ protected $password; - /** @var string|null Readible name or host/IP of the database server */ + /** @var string|null Readable name or host/IP of the database server */ protected $serverName; /** @var bool Whether this PHP instance is for a CLI script */ protected $cliMode; @@ -392,14 +392,14 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * The database must exist or an error might be thrown. Setting this to an empty string * will avoid any such errors and make the handle have no implicit database scope. This is * useful for queries like SHOW STATUS, CREATE DATABASE, or DROP DATABASE. Note that a - * "database" in Postgres is rougly equivalent to an entire MySQL server. This the domain + * "database" in Postgres is roughly equivalent to an entire MySQL server. This the domain * in which user names and such are defined, e.g. users are database-specific in Postgres. * - schema : The database schema to use (if supported). A "schema" in Postgres is roughly * equivalent to a "database" in MySQL. Note that MySQL and SQLite do not use schemas. * - tablePrefix : Optional table prefix that is implicitly added on to all table names * recognized in queries. This can be used in place of schemas for handle site farms. * - flags : Optional bit field of DBO_* constants that define connection, protocol, - * buffering, and transaction behavior. It is STRONGLY adviced to leave the DBO_DEFAULT + * buffering, and transaction behavior. It is STRONGLY advised to leave the DBO_DEFAULT * flag in place UNLESS this database simply acts as a key/value store. * - driver: Optional name of a specific DB client driver. For MySQL, there is only the * 'mysqli' driver; the old one 'mysql' has been removed. @@ -1642,7 +1642,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // Transaction was automatically rolled back, breaking the expectations of // callers relying on that transaction to provide atomic writes, serializability, // or read results consistent with a single point-in-time snapshot. Disconnection - // on ROLLBACK is not an issue, since the intented result of rolling back the + // on ROLLBACK is not an issue, since the intended result of rolling back the // transaction was in fact achieved. Disconnection on COMMIT of an empty transaction // is also not an issue, for similar reasons (T127428). $blockers[] = 'explicit transaction'; @@ -2578,7 +2578,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware $valueTuples = []; foreach ( $rows as $row ) { $rowColumns = array_keys( $row ); - // VALUES(...) requires a uniform correspondance of (column => value) + // VALUES(...) requires a uniform correspondence of (column => value) if ( $rowColumns !== $tupleColumns ) { throw new DBUnexpectedError( $this, @@ -4064,7 +4064,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware * @stable to override * @return bool Whether it is known that the last query error only caused statement rollback * @note This is for backwards compatibility for callers catching DBError exceptions in - * order to ignore problems like duplicate key errors or foriegn key violations + * order to ignore problems like duplicate key errors or foreign key violations * @since 1.31 */ protected function wasKnownStatementRollbackError() { diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 9dd3ab244781..07f28e590ca5 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -1062,7 +1062,7 @@ abstract class DatabaseMysqlBase extends Database { public function doLock( string $lockName, string $method, int $timeout ) { $encName = $this->addQuotes( $this->makeLockName( $lockName ) ); - // Unlike NOW(), SYSDATE() gets the time at invokation rather than query start. + // Unlike NOW(), SYSDATE() gets the time at invocation rather than query start. // The precision argument is silently ignored for MySQL < 5.6 and MariaDB < 5.3. // https://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html#function_sysdate // https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html diff --git a/includes/libs/rdbms/database/DatabasePostgres.php b/includes/libs/rdbms/database/DatabasePostgres.php index ef08c3368da7..7262512e39b6 100644 --- a/includes/libs/rdbms/database/DatabasePostgres.php +++ b/includes/libs/rdbms/database/DatabasePostgres.php @@ -828,7 +828,7 @@ __INDEXATTR__; * @see getSearchPath() * @see setSearchPath() * @since 1.19 - * @return array List of actual schemas for the current sesson + * @return array List of actual schemas for the current session */ public function getSchemas() { $res = $this->query( @@ -884,7 +884,7 @@ __INDEXATTR__; /** * Determine default schema for the current application * Adjust this session schema search path if desired schema exists - * and is not alread there. + * and is not already there. * * We need to have name of the core schema stored to be able * to query database metadata. diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php index d6c9246a15ba..b8f54cdeb7fd 100644 --- a/includes/libs/rdbms/database/DatabaseSqlite.php +++ b/includes/libs/rdbms/database/DatabaseSqlite.php @@ -813,7 +813,7 @@ class DatabaseSqlite extends Database { $s = preg_replace( '/\bauto_increment\b/i', 'AUTOINCREMENT', $s ); // No explicit options $s = preg_replace( '/\)[^);]*(;?)\s*$/', ')\1', $s ); - // AUTOINCREMENT should immedidately follow PRIMARY KEY + // AUTOINCREMENT should immediately follow PRIMARY KEY $s = preg_replace( '/primary key (.*?) autoincrement/i', 'PRIMARY KEY AUTOINCREMENT $1', $s ); } elseif ( preg_match( '/^\s*CREATE (\s*(?:UNIQUE|FULLTEXT)\s+)?INDEX/i', $s ) ) { // No truncated indexes diff --git a/includes/specials/pagers/ContribsPager.php b/includes/specials/pagers/ContribsPager.php index 70c04168f7d1..ba55b1c4c000 100644 --- a/includes/specials/pagers/ContribsPager.php +++ b/includes/specials/pagers/ContribsPager.php @@ -203,7 +203,7 @@ class ContribsPager extends RangeChronologicalPager { $this->revisionsOnly = !empty( $options['revisionsOnly'] ); // Most of this code will use the 'contributions' group DB, which can map to replica DBs - // with extra user based indexes or partioning by user. + // with extra user based indexes or partitioning by user. // Set database before parent constructor to avoid setting it there with wfGetDB $this->mDb = $loadBalancer->getConnectionRef( ILoadBalancer::DB_REPLICA, 'contributions' ); // Needed by call to getIndexField -> getTargetTable from parent constructor diff --git a/includes/utils/ClassCollector.php b/includes/utils/ClassCollector.php index 38b8066e775c..ebf37668c4bc 100644 --- a/includes/utils/ClassCollector.php +++ b/includes/utils/ClassCollector.php @@ -133,7 +133,7 @@ class ClassCollector { switch ( $this->startToken[0] ) { case T_DOUBLE_COLON: // Skip over T_CLASS after T_DOUBLE_COLON because this is something like - // "self::static" which accesses the class name. It doens't define a new class. + // "self::static" which accesses the class name. It doesn't define a new class. $this->startToken = null; break; case T_NEW: |