<ruleset name="MediaWiki">
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.ControlStructures.InlineControlStructure" />
+ <exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
<exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
<exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
+ <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
- <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
- <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
<exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
<exclude name="MediaWiki.Usage.ExtendClassUsage.FunctionVarUsage" />
+ <exclude name="MediaWiki.Usage.ForbiddenFunctions.passthru" />
<exclude name="MediaWiki.VariableAnalysis.ForbiddenGlobalVariables.ForbiddenGlobal$wgTitle" />
+ <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.SingleSpaceBeforeSingleLineComment" />
<exclude name="Squiz.Scope.MethodScope.Missing" />
<exclude name="Squiz.Scope.MemberVarScope.Missing" />
- <exclude name="MediaWiki.Commenting.MissingCovers.MissingCovers" />
</rule>
<rule ref="MediaWiki.NamingConventions.PrefixedGlobalFunctions">
<properties>
<property name="ignoreList" type="array" value="$IP,$messageMemc" />
</properties>
</rule>
+ <rule ref="MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix">
+ <exclude-pattern>profileinfo\.php</exclude-pattern>
+ <exclude-pattern>maintenance/language/checkLanguage\.inc</exclude-pattern>
+ <exclude-pattern>maintenance/doMaintenance\.php</exclude-pattern>
+ <exclude-pattern>maintenance/mergeMessageFileList\.php</exclude-pattern>
+ <exclude-pattern>maintenance/commandLine\.inc</exclude-pattern>
+ </rule>
<rule ref="Generic.Files.LineLength">
<exclude-pattern>*/languages/messages/Messages*\.php</exclude-pattern>
</rule>
* Updated wikimedia/scoped-callback from 1.0.0 to 2.0.0.
** ScopedCallback objects can no longer be serialized.
* Updated wikimedia/wrappedstring from 2.3.0 to 3.0.1.
+* Updated mediawiki/mediawiki-codesniffer from v20.0.0 to v21.0.0.
+* Updated composer/spdx-licenses from 1.3.0 to 1.4.0.
==== New external libraries ====
* Added wikimedia/xmp-reader 0.5.1
},
"require-dev": {
"cache/integration-tests": "0.16.0",
- "composer/spdx-licenses": "1.3.0",
+ "composer/spdx-licenses": "1.4.0",
"hamcrest/hamcrest-php": "^2.0",
"jakub-onderka/php-parallel-lint": "0.9.2",
"jetbrains/phpstorm-stubs": "dev-master#1b9906084d6635456fcf3f3a01f0d7d5b99a578a",
"justinrainbow/json-schema": "~5.2",
- "mediawiki/mediawiki-codesniffer": "20.0.0",
+ "mediawiki/mediawiki-codesniffer": "21.0.0",
"monolog/monolog": "~1.22.1",
"nikic/php-parser": "3.1.3",
"seld/jsonlint": "1.7.1",
* Returns the revision that was current at the time editing was initiated on the client,
* even if the edit was based on an old revision.
*
- * @warning: this method is very poorly named. If the user opened the form with ?oldid=X,
+ * @warning this method is very poorly named. If the user opened the form with ?oldid=X,
* one might think of X as the "base revision", which is NOT what this returns,
* see oldid for that. One might further assume that this corresponds to the $baseRevId
* parameter of WikiPage::doEditContent, which is not the case either.
/**
* Set the title of the revision
*
- * @deprecated: since 1.31, this is now a noop. Pass the Title to the constructor instead.
+ * @deprecated since 1.31, this is now a noop. Pass the Title to the constructor instead.
*
* @param Title $title
*/
* used to determine the content model to use. If no title is know, CONTENT_MODEL_WIKITEXT
* is used as a last resort.
*
- * @todo: drop this, with MCR, there no longer is a single model associated with a revision.
+ * @todo drop this, with MCR, there no longer is a single model associated with a revision.
*
* @return string The content model id associated with this revision,
* see the CONTENT_MODEL_XXX constants.
* If no content format was stored in the database, the default format for this
* revision's content model is returned.
*
- * @todo: drop this, the format is irrelevant to the revision!
+ * @todo drop this, the format is irrelevant to the revision!
*
* @return string The content format id associated with this revision,
* see the CONTENT_FORMAT_XXX constants.
/**
* Returns a list of status messages of the given type (or all if false)
*
- * @note: this handles RawMessage poorly
+ * @note this handles RawMessage poorly
*
* @param string|bool $type
* @return array
*
* @see docs/pageupdater.txt for more information on when thie method can and should be called.
*
- * @note: Calling this method more than once with the same $slotsUpdate
+ * @note Calling this method more than once with the same $slotsUpdate
* has no effect. Calling this method multiple times with different content will cause
* an exception.
*
- * @note: Calling this method after prepareUpdate() has been called will cause an exception.
+ * @note Calling this method after prepareUpdate() has been called will cause an exception.
*
* @param User $user The user to act as context for pre-save transformation (PST).
* Type hint should be reduced to UserIdentity at some point.
/**
* Whether the edit created, or should create, a new revision (that is, it's not a null-edit).
*
- * @warning: at present, "null-revisions" that do not change content but do have a revision
+ * @warning at present, "null-revisions" that do not change content but do have a revision
* record would return false after prepareContent(), but true after prepareUpdate()!
* This should probably be fixed.
*
*
* @see docs/pageupdater.txt for more information on when thie method can and should be called.
*
- * @note: Calling this method more than once with the same revision has no effect.
+ * @note Calling this method more than once with the same revision has no effect.
* $options are only used for the first call. Calling this method multiple times with
* different revisions will cause an exception.
*
- * @note: If grabCurrentRevision() (or prepareContent()) has been called before
+ * @note If grabCurrentRevision() (or prepareContent()) has been called before
* calling this method, $revision->getParentRevision() has to refer to the revision that
* was the current revision at the time grabCurrentRevision() was called.
*
/**
* Computes the total nominal size of the revision's slots, in bogo-bytes.
*
- * @warn This is potentially expensive! It may cause all slot's content to be loaded
+ * @warning This is potentially expensive! It may cause all slot's content to be loaded
* and deserialized.
*
* @return int
* is that slot's hash. For consistency, the combined hash of an empty set of slots
* is the hash of the empty string.
*
- * @warn This is potentially expensive! It may cause all slot's content to be loaded
+ * @warning This is potentially expensive! It may cause all slot's content to be loaded
* and deserialized, then re-serialized and hashed.
*
* @return string
* Such revisions can for instance identify page rename
* operations and other such meta-modifications.
*
- * @note: This method grabs a FOR UPDATE lock on the relevant row of the page table,
+ * @note This method grabs a FOR UPDATE lock on the relevant row of the page table,
* to prevent a new revision from being inserted before the null revision has been written
* to the database.
*
/**
* Update link tables with outgoing links from an updated article
*
- * @note: this is managed by DeferredUpdates::execute(). Do not run this in a transaction.
+ * @note this is managed by DeferredUpdates::execute(). Do not run this in a transaction.
*/
public function doUpdate() {
if ( $this->ticket ) {
* Note that type parameters and accept extension like the "level" parameter
* are not supported, weights are derived from "q" values only.
*
- * @todo: If additional type parameters are present, ignore them cleanly.
+ * @todo If additional type parameters are present, ignore them cleanly.
* At present, they often confuse the result.
*
* See HTTP/1.1 section 14 for details.
}
/**
- * @TODO change this code to work in one batch
+ * @todo change this code to work in one batch
* @param string $lockSrv
* @param array $pathsByType
* @return StatusValue
abstract protected function doGet( $key, $flags = 0 );
/**
- * @note: This method is only needed if merge() uses mergeViaCas()
+ * @note This method is only needed if merge() uses mergeViaCas()
*
* @param string $key
* @param mixed &$casToken
const STATUS_TRX_NONE = 3;
/**
- * @note: exceptions for missing libraries/drivers should be thrown in initConnection()
+ * @note exceptions for missing libraries/drivers should be thrown in initConnection()
* @param array $params Parameters passed from Database::factory()
*/
protected function __construct( array $params ) {
/**
* Basic database interface for live and lazy-loaded relation database handles
*
- * @note: IDatabase and DBConnRef should be updated to reflect any changes
+ * @note IDatabase and DBConnRef should be updated to reflect any changes
* @ingroup Database
*/
interface IDatabase {
*
* This is useful for combining cooperative locks and DB transactions.
*
- * @note: do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
+ * @note do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
*
* The callback takes the following arguments:
* - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK)
*
* Updates will execute in the order they were enqueued.
*
- * @note: do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
+ * @note do not assume that *other* IDatabase instances will be AUTOCOMMIT mode
*
* The callback takes the following arguments:
* - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE)
* - The failures are from contention solvable via onTransactionPreCommitOrIdle()
* - The failures are deadlocks; the RDBMs usually discard the whole transaction
*
- * @note: callers must use additional measures for situations involving two or more
+ * @note callers must use additional measures for situations involving two or more
* (peer) transactions (e.g. updating two database servers at once). The transaction
* and savepoint logic of this method only applies to this specific IDatabase instance.
*
* corresponding startAtomic() implicitly started a transaction, that
* transaction is rolled back.
*
- * @note: callers must use additional measures for situations involving two or more
+ * @note callers must use additional measures for situations involving two or more
* (peer) transactions (e.g. updating two database servers at once). The transaction
* and savepoint logic of startAtomic() are bound to specific IDatabase instances.
*
* - oldid|revision: the revision ID
* @param OutputPage $output
*
- * @note: Instead of an output page, a WebResponse could be sufficient, but
+ * @note Instead of an output page, a WebResponse could be sufficient, but
* redirect logic is currently implemented in OutputPage.
*
* @throws HttpError
/**
* Get the user language used by the parser for this page and split the parser cache.
*
- * @warning: Calling this causes the parser cache to be fragmented by user language!
+ * @warning Calling this causes the parser cache to be fragmented by user language!
* To avoid cache fragmentation, output should not depend on the user language.
* Use Parser::getFunctionLang() or Parser::getTargetLanguage() instead!
*
/**
* Same as getUserLangObj() but returns a string instead.
*
- * @warning: Calling this causes the parser cache to be fragmented by user language!
+ * @warning Calling this causes the parser cache to be fragmented by user language!
* To avoid cache fragmentation, output should not depend on the user language.
* Use Parser::getFunctionLang() or Parser::getTargetLanguage() instead!
*
/**
* @since 1.27
*
- * @todo: inject some kind of connection manager that is aware of the target wiki,
+ * @todo inject some kind of connection manager that is aware of the target wiki,
* instead of injecting a LoadBalancer.
*
* @param LoadBalancer $dbLoadBalancer
}
/**
- * @todo: move to MW-specific factory class and inject temp dir
+ * @todo move to MW-specific factory class and inject temp dir
* @return UIDGenerator
*/
protected static function singleton() {
* For best performance, call this once only for all tests. However, it can
* be called at the start of each test if more isolation is desired.
*
- * @todo: This is basically an unrefactored copy of
+ * @todo This is basically an unrefactored copy of
* MediaWikiTestCase::setupAllTestDBs. They should be factored out somehow.
*
* Do not call this function from a MediaWikiTestCase subclass, since