summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiddharth VP <siddharthvp@gmail.com>2021-12-30 18:33:20 +0530
committerSiddharth VP <siddharthvp@gmail.com>2021-12-30 20:38:04 +0530
commit60faebb725998e1999bb3cc9c875eabf3364c60d (patch)
treeb7f737947564564f0f87b87313445368ee9cd097
parenta46be96d847b8757cc6dc51fbdd313c8c359b80b (diff)
Fix typos in comments (I-J)
Change-Id: Icaea2b6665cfc3b811d94f70c93452237f5e72bf
-rw-r--r--includes/actions/InfoAction.php2
-rw-r--r--includes/api/IApiMessage.php2
-rw-r--r--includes/editpage/Constraint/IEditConstraint.php4
-rw-r--r--includes/import/ImportStringSource.php2
-rw-r--r--includes/import/ImportableUploadRevision.php2
-rw-r--r--includes/jobqueue/Job.php2
-rw-r--r--includes/jobqueue/JobQueue.php4
-rw-r--r--includes/jobqueue/JobQueueDB.php2
-rw-r--r--includes/jobqueue/JobQueueFederated.php2
-rw-r--r--includes/jobqueue/JobQueueRedis.php6
-rw-r--r--includes/libs/rdbms/database/IDatabase.php14
-rw-r--r--includes/libs/rdbms/database/IMaintainableDatabase.php2
-rw-r--r--includes/libs/rdbms/lbfactory/ILBFactory.php6
-rw-r--r--includes/libs/rdbms/loadbalancer/ILoadBalancer.php16
-rw-r--r--includes/media/JpegHandler.php4
-rw-r--r--includes/page/ImagePage.php2
-rw-r--r--includes/specials/pagers/ImageListPager.php4
17 files changed, 38 insertions, 38 deletions
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index b0270ceb8d29..0c8b57494379 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -220,7 +220,7 @@ class InfoAction extends FormlessAction {
$content .= $this->msg( 'pageinfo-header' )->parse();
}
- // TODO we shouldn't be adding styles manually like thes
+ // TODO we shouldn't be adding styles manually like this
// Hide "This page is a member of # hidden categories" explanation
$content .= Html::element(
'style',
diff --git a/includes/api/IApiMessage.php b/includes/api/IApiMessage.php
index 7ce996c0c0e9..32154ced5bd7 100644
--- a/includes/api/IApiMessage.php
+++ b/includes/api/IApiMessage.php
@@ -24,7 +24,7 @@
* The idea is that it's a Message that has some extra data for the API to use when interpreting it
* as an error (or, in the future, as a warning). Internals of MediaWiki often use messages (or
* message keys, or Status objects containing messages) to pass information about errors to the user
- * (see e.g. PermssionManager::getPermissionErrors()) and the API has to make do with that.
+ * (see e.g. PermissionManager::getPermissionErrors()) and the API has to make do with that.
*
* @since 1.25
* @note This interface exists to work around PHP's inheritance, so ApiMessage
diff --git a/includes/editpage/Constraint/IEditConstraint.php b/includes/editpage/Constraint/IEditConstraint.php
index f1f4d55d2b9a..e9dd46892383 100644
--- a/includes/editpage/Constraint/IEditConstraint.php
+++ b/includes/editpage/Constraint/IEditConstraint.php
@@ -32,10 +32,10 @@ use StatusValue;
*/
interface IEditConstraint extends IEditObject {
- /** @var string - Constaint passed, no error */
+ /** @var string - Constraint passed, no error */
public const CONSTRAINT_PASSED = 'constraint-passed';
- /** @var string - Constaint failed, use getLegacyStatus to see the failure */
+ /** @var string - Constraint failed, use getLegacyStatus to see the failure */
public const CONSTRAINT_FAILED = 'constraint-failed';
/**
diff --git a/includes/import/ImportStringSource.php b/includes/import/ImportStringSource.php
index c1ab7690634b..85c3fec8e1fc 100644
--- a/includes/import/ImportStringSource.php
+++ b/includes/import/ImportStringSource.php
@@ -26,7 +26,7 @@
/**
* Used for importing XML dumps where the content of the dump is in a string.
- * This class is ineffecient, and should only be used for small dumps.
+ * This class is inefficient, and should only be used for small dumps.
* For larger dumps, ImportStreamSource should be used instead.
*
* @ingroup SpecialPage
diff --git a/includes/import/ImportableUploadRevision.php b/includes/import/ImportableUploadRevision.php
index 3f60112a0f5c..ed31bd031430 100644
--- a/includes/import/ImportableUploadRevision.php
+++ b/includes/import/ImportableUploadRevision.php
@@ -43,7 +43,7 @@ interface ImportableUploadRevision {
/**
* @since 1.31
- * @return string|bool sha1 of the revision, false if not set or errors occour.
+ * @return string|bool sha1 of the revision, false if not set or errors occur.
*/
public function getSha1();
diff --git a/includes/jobqueue/Job.php b/includes/jobqueue/Job.php
index 108016288e7e..03cc2788fc2e 100644
--- a/includes/jobqueue/Job.php
+++ b/includes/jobqueue/Job.php
@@ -27,7 +27,7 @@ use MediaWiki\Page\PageReference;
* Class to both describe a background job and handle jobs.
* To push jobs onto queues, use JobQueueGroup::singleton()->push();
*
- * Job objects are constructed by the job queue, and must have an approriate
+ * Job objects are constructed by the job queue, and must have an appropriate
* constructor signature; see IJobSpecification.
*
* @stable to extend
diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php
index a7494a4ce42b..d0cc135b6dce 100644
--- a/includes/jobqueue/JobQueue.php
+++ b/includes/jobqueue/JobQueue.php
@@ -117,7 +117,7 @@ abstract class JobQueue {
* by timestamp, allowing for some jobs to be popped off out of order.
* If "random" is used, pop() will pick jobs in random order.
* Note that it may only be weakly random (e.g. a lottery of the oldest X).
- * If "any" is choosen, the queue will use whatever order is the fastest.
+ * If "any" is chosen, the queue will use whatever order is the fastest.
* This might be useful for improving concurrency for job acquisition.
* - claimTTL : If supported, the queue will recycle jobs that have been popped
* but not acknowledged as completed after this many seconds. Recycling
@@ -530,7 +530,7 @@ abstract class JobQueue {
protected function doIsRootJobOldDuplicate( IJobSpecification $job ) {
$params = $job->hasRootJobParams() ? $job->getRootJobParams() : null;
if ( !$params ) {
- return false; // job has no de-deplication info
+ return false; // job has no de-duplication info
}
$key = $this->getRootJobCacheKey( $params['rootJobSignature'], $job->getType() );
diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index b7e95d626df5..3f8f2cb56381 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -837,7 +837,7 @@ class JobQueueDB extends JobQueue {
// However, SQLite has the opposite behavior due to DB-level locking.
$flags = $lb::CONN_TRX_AUTOCOMMIT;
} else {
- // Jobs insertion will be defered until the PRESEND stage to reduce contention.
+ // Jobs insertion will be deferred until the PRESEND stage to reduce contention.
$flags = 0;
}
diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php
index a73d6da487d7..d4497b80daaf 100644
--- a/includes/jobqueue/JobQueueFederated.php
+++ b/includes/jobqueue/JobQueueFederated.php
@@ -176,7 +176,7 @@ class JobQueueFederated extends JobQueue {
// Local ring variable that may be changed to point to a new ring on failure
$partitionRing = $this->partitionRing;
// Try to insert the jobs and update $partitionsTry on any failures.
- // Retry to insert any remaning jobs again, ignoring the bad partitions.
+ // Retry to insert any remaining jobs again, ignoring the bad partitions.
$jobsLeft = $jobs;
for ( $i = $this->maxPartitionsTry; $i > 0 && count( $jobsLeft ); --$i ) {
try {
diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php
index d35899ad096f..1cefe35f9e3e 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -88,7 +88,7 @@ class JobQueueRedis extends JobQueue {
* - compression : The type of compression to use; one of (none,gzip).
* - daemonized : Set to true if the redisJobRunnerService runs in the background.
* This will disable job recycling/undelaying from the MediaWiki side
- * to avoid redundance and out-of-sync configuration.
+ * to avoid redundancy and out-of-sync configuration.
* @throws InvalidArgumentException
*/
public function __construct( array $params ) {
@@ -330,7 +330,7 @@ LUA;
continue;
}
- // If $item is invalid, the runner loop recyling will cleanup as needed
+ // If $item is invalid, the runner loop recycling will cleanup as needed
$job = $this->getJobFromFields( $item ); // may be false
} while ( !$job ); // job may be false if invalid
} catch ( RedisException $e ) {
@@ -471,7 +471,7 @@ LUA;
*/
protected function doIsRootJobOldDuplicate( IJobSpecification $job ) {
if ( !$job->hasRootJobParams() ) {
- return false; // job has no de-deplication info
+ return false; // job has no de-duplication info
}
$params = $job->getRootJobParams();
diff --git a/includes/libs/rdbms/database/IDatabase.php b/includes/libs/rdbms/database/IDatabase.php
index 5fec4f25825b..1319aafc1be2 100644
--- a/includes/libs/rdbms/database/IDatabase.php
+++ b/includes/libs/rdbms/database/IDatabase.php
@@ -76,7 +76,7 @@ interface IDatabase {
/** @var string Estimate time to apply (scanning, applying) */
public const ESTIMATE_DB_APPLY = 'apply';
- /** @var int Combine list with comma delimeters */
+ /** @var int Combine list with comma delimiters */
public const LIST_COMMA = 0;
/** @var int Combine list with AND clauses */
public const LIST_AND = 1;
@@ -132,7 +132,7 @@ interface IDatabase {
/** @var int Query is known to be a Data Definition Language command */
public const QUERY_CHANGE_SCHEMA = 256 | self::QUERY_IGNORE_DBO_TRX;
- /** Flag to return the lock acquision timestamp (null if not acquired) */
+ /** Flag to return the lock acquisition timestamp (null if not acquired) */
public const LOCK_TIMESTAMP = 1;
/** @var bool Parameter to unionQueries() for UNION ALL */
@@ -1431,7 +1431,7 @@ interface IDatabase {
* @param string|array $conds Array of conditions. See $conds in IDatabase::select()
* In order to prevent possible performance or replication issues or damaging a data
* accidentally, an empty condition for 'delete' queries isn't allowed.
- * IDatabase::ALL_ROWS should be passed explicitely in order to delete all rows.
+ * IDatabase::ALL_ROWS should be passed explicitly in order to delete all rows.
* @param string $fname Name of the calling function
* @return bool Return true if no exception was thrown (deprecated since 1.33)
* @throws DBError If an error occurs, {@see query}
@@ -1655,7 +1655,7 @@ interface IDatabase {
*
* Use this method only for the following purposes:
* - (a) Release of cooperative locks on resources
- * - (b) Cancellation of in-proccess deferred tasks
+ * - (b) Cancellation of in-process deferred tasks
*
* The callback takes the following arguments:
* - How the current atomic section (if any) or overall transaction (otherwise) ended
@@ -1902,7 +1902,7 @@ interface IDatabase {
public function cancelAtomic( $fname = __METHOD__, AtomicSectionIdentifier $sectionId = null );
/**
- * Perform an atomic section of reversable SQL statements from a callback
+ * Perform an atomic section of reversible SQL statements from a callback
*
* The $callback takes the following arguments:
* - This database object
@@ -1931,7 +1931,7 @@ interface IDatabase {
* // Figure out where to store the data based on the new row's ID
* $path = $this->recordDirectory . '/' . $dbw->insertId();
* // Write the record data to the storage system;
- * // blob store throughs StoreFailureException on failure
+ * // blob store throws StoreFailureException on failure
* $this->blobStore->create( $path, $record->getJSON() );
* // Try to cleanup files orphaned by transaction rollback
* $dbw->onTransactionResolution(
@@ -2191,7 +2191,7 @@ interface IDatabase {
*
* Named locks are not related to transactions
*
- * @param string $lockName Name of lock to aquire
+ * @param string $lockName Name of lock to acquire
* @param string $method Name of the calling method
* @param int $timeout Acquisition timeout in seconds (0 means non-blocking)
* @param int $flags Bit field of IDatabase::LOCK_* constants
diff --git a/includes/libs/rdbms/database/IMaintainableDatabase.php b/includes/libs/rdbms/database/IMaintainableDatabase.php
index 5180f17f957d..3b6976a5e634 100644
--- a/includes/libs/rdbms/database/IMaintainableDatabase.php
+++ b/includes/libs/rdbms/database/IMaintainableDatabase.php
@@ -257,7 +257,7 @@ interface IMaintainableDatabase extends IDatabase {
* doing all row updates within that transaction. It will not be possible to update
* rows in batches; this might result in high replication lag.
* - b) Forgo table locks entirely and avoid calling this method. Careful use of hints like
- * LOCK IN SHARE MODE and FOR UPDATE and the use of query batching may be preferrable
+ * LOCK IN SHARE MODE and FOR UPDATE and the use of query batching may be preferable
* to using table locks with a potentially large transaction. Use of MySQL and Postges
* style REPEATABLE-READ (Snapshot Isolation with or without First-Committer-Rule) can
* also be considered for certain tasks that require a consistent view of entire tables.
diff --git a/includes/libs/rdbms/lbfactory/ILBFactory.php b/includes/libs/rdbms/lbfactory/ILBFactory.php
index 54fda99dc6e7..8dae28e6d05b 100644
--- a/includes/libs/rdbms/lbfactory/ILBFactory.php
+++ b/includes/libs/rdbms/lbfactory/ILBFactory.php
@@ -31,7 +31,7 @@ use InvalidArgumentException;
* @since 1.28
*/
interface ILBFactory {
- /** Idion for "no special shutdown flags" */
+ /** Idiom for "no special shutdown flags" */
public const SHUTDOWN_NORMAL = 0;
/** Do not save "session consistency" DB replication positions */
public const SHUTDOWN_NO_CHRONPROT = 1;
@@ -306,7 +306,7 @@ interface ILBFactory {
/**
* Check if transaction rounds can be started, committed, or rolled back right now
*
- * This can be used as a recusion guard to avoid exceptions in transaction callbacks.
+ * This can be used as a recursion guard to avoid exceptions in transaction callbacks.
*
* @return bool
* @since 1.32
@@ -330,7 +330,7 @@ interface ILBFactory {
public function hasMasterChanges();
/**
- * Detemine if any lagged replica DB connection was used
+ * Determine if any lagged replica DB connection was used
*
* This only applies to the instantiated tracked load balancer instances.
*
diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
index 753c0e04ef7d..d324c96cfba0 100644
--- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
@@ -47,7 +47,7 @@ use LogicException;
* Every iteration of beginPrimaryChanges()/commitPrimaryChanges() is called a "transaction round".
* Rounds are useful on the primary DB connections because they make single-DB (and by and large
* multi-DB) updates in web requests all-or-nothing. Also, transactions on replica DBs are useful
- * when REPEATABLE-READ or SERIALIZABLE isolation is used because all foriegn keys and constraints
+ * when REPEATABLE-READ or SERIALIZABLE isolation is used because all foreign keys and constraints
* hold across separate queries in the DB transaction since the data appears within a consistent
* point-in-time snapshot.
*
@@ -204,7 +204,7 @@ interface ILoadBalancer {
* This takes into account load ratios and lag times. It should return a consistent
* index during the life time of the load balancer. This initially checks replica DBs
* for connectivity to avoid returning an unusable server. This means that connections
- * might be attempted by calling this method (usally one at the most but possibly more).
+ * might be attempted by calling this method (usually one at the most but possibly more).
* Subsequent calls with the same $group will not need to make new connection attempts
* since the acquired connection for each group is preserved.
*
@@ -232,7 +232,7 @@ interface ILoadBalancer {
/**
* Set the primary wait position and wait for a generic replica DB to catch up to it
*
- * This method is only intented for use a throttling mechanism for high-volume updates.
+ * This method is only intended for use a throttling mechanism for high-volume updates.
* Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().
*
* This can be used a faster proxy for waitForAll()
@@ -246,7 +246,7 @@ interface ILoadBalancer {
/**
* Set the primary wait position and wait for ALL replica DBs to catch up to it
*
- * This method is only intented for use a throttling mechanism for high-volume updates.
+ * This method is only intended for use a throttling mechanism for high-volume updates.
* Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().
*
* @param DBPrimaryPos|bool $pos Primary position or false
@@ -539,7 +539,7 @@ interface ILoadBalancer {
* at least as up-to-date as queries (prior to this method call) on the old connections.
*
* This can be useful for implementing session consistency, where the session
- * will be resumed accross multiple HTTP requests or CLI script instances.
+ * will be resumed across multiple HTTP requests or CLI script instances.
*
* @return DBPrimaryPos|bool Replication position or false if not applicable
* @since 1.34
@@ -585,7 +585,7 @@ interface ILoadBalancer {
/**
* Run pre-commit callbacks and defer execution of post-commit callbacks
*
- * Use this only for mutli-database commits
+ * Use this only for multi-database commits
*
* @param string $fname Caller name
* @param int|null $owner ID of the calling instance (e.g. the LBFactory ID)
@@ -605,7 +605,7 @@ interface ILoadBalancer {
/**
* Perform all pre-commit checks for things like replication safety
*
- * Use this only for mutli-database commits
+ * Use this only for multi-database commits
*
* @param array $options Includes:
* - maxWriteDuration : max write query duration time in seconds
@@ -824,7 +824,7 @@ interface ILoadBalancer {
/**
* Checks whether the database for generic connections this request was both:
- * - a) Already choosen due to a prior connection attempt
+ * - a) Already chosen due to a prior connection attempt
* - b) Considered highly "lagged"
*
* @note This method will never cause a new DB connection
diff --git a/includes/media/JpegHandler.php b/includes/media/JpegHandler.php
index 932109887715..c03505ea23ef 100644
--- a/includes/media/JpegHandler.php
+++ b/includes/media/JpegHandler.php
@@ -206,14 +206,14 @@ class JpegHandler extends ExifBitmapHandler {
* (other profiles will be left untouched)
* * without color space or profile, in which case browsers
* should assume sRGB, but don't always do (e.g. on wide-gamut
- * monitors (unless it's meant for low bandwith)
+ * monitors (unless it's meant for low bandwidth)
* @see https://phabricator.wikimedia.org/T134498
*/
$colorSpaces = [ self::SRGB_EXIF_COLOR_SPACE, '-' ];
$profiles = [ self::SRGB_ICC_PROFILE_DESCRIPTION ];
// we'll also add TinyRGB profile to images lacking a profile, but
- // only if they're not low quality (which are meant to save bandwith
+ // only if they're not low quality (which are meant to save bandwidth
// and we don't want to increase the filesize by adding a profile)
if ( isset( $params['quality'] ) && $params['quality'] > 30 ) {
$profiles[] = '-';
diff --git a/includes/page/ImagePage.php b/includes/page/ImagePage.php
index 5c742c7b39a9..8fb5585708ee 100644
--- a/includes/page/ImagePage.php
+++ b/includes/page/ImagePage.php
@@ -317,7 +317,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/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php
index e821b1362e19..77387b1e06e5 100644
--- a/includes/specials/pagers/ImageListPager.php
+++ b/includes/specials/pagers/ImageListPager.php
@@ -62,7 +62,7 @@ class ImageListPager extends TablePager {
private $userCache;
/**
- * The unique sort fields for the sort options for unique pagniate
+ * The unique sort fields for the sort options for unique paginate
*/
private const INDEX_FIELDS = [
'img_timestamp' => [ 'img_timestamp', 'img_name' ],
@@ -239,7 +239,7 @@ class ImageListPager extends TablePager {
return false;
}
$sortable = array_keys( self::INDEX_FIELDS );
- /* For reference, the indicies we can use for sorting are:
+ /* For reference, the indices we can use for sorting are:
* On the image table: img_actor_timestamp, img_size, img_timestamp
* On oldimage: oi_actor_timestamp, oi_name_timestamp
*