plain();
diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php
index 25a271ca14e..c2c9d661199 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -793,9 +793,9 @@ LUA;
private function getGlobalKey( $name ) {
$parts = [ 'global', 'jobqueue', $name ];
foreach ( $parts as $part ) {
- if ( !preg_match( '/[a-zA-Z0-9_-]+/', $part ) ) {
- throw new InvalidArgumentException( "Key part characters are out of range." );
- }
+ if ( !preg_match( '/[a-zA-Z0-9_-]+/', $part ) ) {
+ throw new InvalidArgumentException( "Key part characters are out of range." );
+ }
}
return implode( ':', $parts );
diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php
index 651a332d5e8..f9284a57ceb 100644
--- a/includes/jobqueue/jobs/RefreshLinksJob.php
+++ b/includes/jobqueue/jobs/RefreshLinksJob.php
@@ -29,7 +29,7 @@ use MediaWiki\MediaWikiServices;
* - a) Recursive jobs to update links for backlink pages for a given title.
* These jobs have (recursive:true,table:
) set.
* - b) Jobs to update links for a set of pages (the job title is ignored).
- * These jobs have (pages:(:(,),...) set.
+ * These jobs have (pages:(:(,),...) set.
* - c) Jobs to update links for a single page (the job title)
* These jobs need no extra fields set.
*
diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php
index 7f500554bdd..1c12a1c9b41 100644
--- a/includes/jobqueue/utils/BacklinkJobUtils.php
+++ b/includes/jobqueue/utils/BacklinkJobUtils.php
@@ -33,7 +33,7 @@
* For example, if templates A and B are edited (at the same time) the queue will have:
* (A base, B base)
* When these jobs run, the queue will have per-title and remnant partition jobs:
- * (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
+ * (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
*
* This works best when the queue is FIFO, for several reasons:
* - a) Since the remnant jobs are enqueued after the leaf jobs, the slower leaf jobs have to
@@ -133,7 +133,7 @@ class BacklinkJobUtils {
'table' => $params['table'],
'range' => [
'start' => $ranges[1][0],
- 'end' => $ranges[count( $ranges ) - 1][1],
+ 'end' => $ranges[count( $ranges ) - 1][1],
'batchSize' => $realBSize,
'subranges' => array_slice( $ranges, 1 )
],
diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index bc99672f363..9d84610cd84 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -8,7 +8,7 @@
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
diff --git a/includes/libs/CryptHKDF.php b/includes/libs/CryptHKDF.php
index 4c867574182..6b3e4a7acac 100644
--- a/includes/libs/CryptHKDF.php
+++ b/includes/libs/CryptHKDF.php
@@ -197,11 +197,11 @@ class CryptHKDF {
* From http://eprint.iacr.org/2010/264.pdf:
*
* The scheme HKDF is specifed as:
- * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
+ * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
* where the values K(i) are defined as follows:
- * PRK = HMAC(XTS, SKM)
- * K(1) = HMAC(PRK, CTXinfo || 0);
- * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
+ * PRK = HMAC(XTS, SKM)
+ * K(1) = HMAC(PRK, CTXinfo || 0);
+ * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
* where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits;
* the counter i is non-wrapping and of a given fixed size, e.g., a single byte.
* Note that the length of the HMAC output is the same as its key length and therefore
diff --git a/includes/libs/StatusValue.php b/includes/libs/StatusValue.php
index db085da5486..ba55bafb035 100644
--- a/includes/libs/StatusValue.php
+++ b/includes/libs/StatusValue.php
@@ -85,7 +85,7 @@ class StatusValue {
* defined as:
* [
* 0 => object(StatusValue) # the StatusValue with error messages, only
- * 1 => object(StatusValue) # The StatusValue with warning messages, only
+ * 1 => object(StatusValue) # The StatusValue with warning messages, only
* ]
*
* @return StatusValue[]
diff --git a/includes/libs/mime/mime.info b/includes/libs/mime/mime.info
index 5edd8897efa..2468f3841db 100644
--- a/includes/libs/mime/mime.info
+++ b/includes/libs/mime/mime.info
@@ -95,9 +95,9 @@ application/vnd.ms-powerpoint [OFFICE]
application/x-director [OFFICE]
text/rtf [OFFICE]
-application/vnd.openxmlformats-officedocument.wordprocessingml.document [OFFICE]
+application/vnd.openxmlformats-officedocument.wordprocessingml.document [OFFICE]
application/vnd.openxmlformats-officedocument.wordprocessingml.template [OFFICE]
-application/vnd.ms-word.document.macroEnabled.12 [OFFICE]
+application/vnd.ms-word.document.macroEnabled.12 [OFFICE]
application/vnd.ms-word.template.macroEnabled.12 [OFFICE]
application/vnd.openxmlformats-officedocument.presentationml.template [OFFICE]
application/vnd.openxmlformats-officedocument.presentationml.slideshow [OFFICE]
diff --git a/includes/libs/objectcache/RESTBagOStuff.php b/includes/libs/objectcache/RESTBagOStuff.php
index ae91be51de6..730eed1e300 100644
--- a/includes/libs/objectcache/RESTBagOStuff.php
+++ b/includes/libs/objectcache/RESTBagOStuff.php
@@ -63,9 +63,9 @@ class RESTBagOStuff extends BagOStuff {
protected function doGet( $key, $flags = 0 ) {
$req = [
'method' => 'GET',
- 'url' => $this->url . rawurlencode( $key ),
-
+ 'url' => $this->url . rawurlencode( $key ),
];
+
list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->client->run( $req );
if ( $rcode === 200 ) {
if ( is_string( $rbody ) ) {
diff --git a/includes/libs/objectcache/WinCacheBagOStuff.php b/includes/libs/objectcache/WinCacheBagOStuff.php
index d84c9591e3f..98f44d11b5c 100644
--- a/includes/libs/objectcache/WinCacheBagOStuff.php
+++ b/includes/libs/objectcache/WinCacheBagOStuff.php
@@ -41,7 +41,7 @@ class WinCacheBagOStuff extends BagOStuff {
$result = wincache_ucache_set( $key, serialize( $value ), $expire );
/* wincache_ucache_set returns an empty array on success if $value
- was an array, bool otherwise */
+ * was an array, bool otherwise */
return ( is_array( $result ) && $result === [] ) || $result;
}
diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php
index 0d171f5247f..17d1a294762 100644
--- a/includes/libs/xmp/XMP.php
+++ b/includes/libs/xmp/XMP.php
@@ -647,7 +647,7 @@ class XMPReader implements LoggerAwareInterface {
private function endElementNested( $elm ) {
/* cur item must be the same as $elm, unless if in MODE_STRUCT
- in which case it could also be rdf:Description */
+ * in which case it could also be rdf:Description */
if ( $this->curItem[0] !== $elm
&& !( $elm === self::NS_RDF . ' Description'
&& $this->mode[0] === self::MODE_STRUCT )
diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php
index 21effa0e02d..3858f27566e 100644
--- a/includes/mail/UserMailer.php
+++ b/includes/mail/UserMailer.php
@@ -103,9 +103,9 @@ class UserMailer {
* @param string $subject Email's subject.
* @param string $body Email's text or Array of two strings to be the text and html bodies
* @param array $options:
- * 'replyTo' MailAddress
- * 'contentType' string default 'text/plain; charset=UTF-8'
- * 'headers' array Extra headers to set
+ * 'replyTo' MailAddress
+ * 'contentType' string default 'text/plain; charset=UTF-8'
+ * 'headers' array Extra headers to set
*
* @throws MWException
* @throws Exception
@@ -197,9 +197,9 @@ class UserMailer {
* @param string $subject Email's subject.
* @param string $body Email's text or Array of two strings to be the text and html bodies
* @param array $options:
- * 'replyTo' MailAddress
- * 'contentType' string default 'text/plain; charset=UTF-8'
- * 'headers' array Extra headers to set
+ * 'replyTo' MailAddress
+ * 'contentType' string default 'text/plain; charset=UTF-8'
+ * 'headers' array Extra headers to set
*
* @throws MWException
* @throws Exception
diff --git a/includes/media/DjVuImage.php b/includes/media/DjVuImage.php
index 5e8f8c8f1d0..57b5b36c142 100644
--- a/includes/media/DjVuImage.php
+++ b/includes/media/DjVuImage.php
@@ -277,9 +277,9 @@ class DjVuImage {
$reg = << # Text to match is composed of atoms of either:
- \\\\. # - any escaped character
- | # - any character different from " and \
- [^"\\\\]+
+ \\\\. # - any escaped character
+ | # - any character different from " and \
+ [^"\\\\]+
)*?)
"\s*\)
| # Or page can be empty ; in this case, djvutxt dumps ()
diff --git a/includes/media/Jpeg.php b/includes/media/Jpeg.php
index 6c857a85653..c9f0dfab10e 100644
--- a/includes/media/Jpeg.php
+++ b/includes/media/Jpeg.php
@@ -112,8 +112,8 @@ class JpegHandler extends ExifBitmapHandler {
wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
/* This used to use 0 (ExifBitmapHandler::OLD_BROKEN_FILE) for the cases
- * * No metadata in the file
- * * Something is broken in the file.
+ * * No metadata in the file
+ * * Something is broken in the file.
* However, if the metadata support gets expanded then you can't tell if the 0 is from
* a broken file, or just no props found. A broken file is likely to stay broken, but
* a file which had no props could have props once the metadata support is improved.
diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php
index 76ee525cb94..605a873b7db 100644
--- a/includes/parser/DateFormatter.php
+++ b/includes/parser/DateFormatter.php
@@ -107,7 +107,7 @@ class DateFormatter {
$this->targets[self::ISO2] = '[[y-m-d]]';
# Rules
- # pref source target
+ # pref source target
$this->rules[self::DMY][self::MD] = self::DM;
$this->rules[self::ALL][self::MD] = self::MD;
$this->rules[self::MDY][self::DM] = self::MD;
@@ -127,7 +127,7 @@ class DateFormatter {
* Get a DateFormatter object
*
* @param Language|string|null $lang In which language to format the date
- * Defaults to the site content language
+ * Defaults to the site content language
* @return DateFormatter
*/
public static function getInstance( $lang = null ) {
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 86aa06a18ef..9a9b9d8f192 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1450,15 +1450,16 @@ class Parser {
$spdash = "(?:-|$space)"; # a dash or a non-newline space
$spaces = "$space++"; # possessive match of 1 or more spaces
$text = preg_replace_callback(
- '!(?: # Start cases
- (].*?) | # m[1]: Skip link text
- (<.*?>) | # m[2]: Skip stuff inside
- # HTML elements' . "
- (\b(?i:$prots)($addr$urlChar*)) | # m[3]: Free external links
- # m[4]: Post-protocol path
- \b(?:RFC|PMID) $spaces # m[5]: RFC or PMID, capture number
+ '!(?: # Start cases
+ (].*?) | # m[1]: Skip link text
+ (<.*?>) | # m[2]: Skip stuff inside HTML elements' . "
+ (\b # m[3]: Free external links
+ (?i:$prots)
+ ($addr$urlChar*) # m[4]: Post-protocol path
+ ) |
+ \b(?:RFC|PMID) $spaces # m[5]: RFC or PMID, capture number
([0-9]+)\b |
- \bISBN $spaces ( # m[6]: ISBN, capture number
+ \bISBN $spaces ( # m[6]: ISBN, capture number
(?: 97[89] $spdash? )? # optional 13-digit ISBN prefix
(?: [0-9] $spdash? ){9} # 9 digits with opt. delimiters
[0-9Xx] # check digit
diff --git a/includes/registration/Processor.php b/includes/registration/Processor.php
index a4100bbc07a..210deb1bdea 100644
--- a/includes/registration/Processor.php
+++ b/includes/registration/Processor.php
@@ -23,11 +23,11 @@ interface Processor {
/**
* @return array With following keys:
- * 'globals' - variables to be set to $GLOBALS
- * 'defines' - constants to define
- * 'callbacks' - functions to be executed by the registry
- * 'credits' - metadata to be stored by registry
- * 'attributes' - registration info which isn't a global variable
+ * 'globals' - variables to be set to $GLOBALS
+ * 'defines' - constants to define
+ * 'callbacks' - functions to be executed by the registry
+ * 'credits' - metadata to be stored by registry
+ * 'attributes' - registration info which isn't a global variable
*/
public function getExtractedInfo();
diff --git a/includes/registration/VersionChecker.php b/includes/registration/VersionChecker.php
index 5aaaa1b8ab9..a31551c3614 100644
--- a/includes/registration/VersionChecker.php
+++ b/includes/registration/VersionChecker.php
@@ -87,17 +87,17 @@ class VersionChecker {
* installed extensions in the $credits array.
*
* Example $extDependencies:
- * {
- * 'FooBar' => {
- * 'MediaWiki' => '>= 1.25.0',
- * 'extensions' => {
- * 'FooBaz' => '>= 1.25.0'
- * },
- * 'skins' => {
- * 'BazBar' => '>= 1.0.0'
- * }
- * }
- * }
+ * {
+ * 'FooBar' => {
+ * 'MediaWiki' => '>= 1.25.0',
+ * 'extensions' => {
+ * 'FooBaz' => '>= 1.25.0'
+ * },
+ * 'skins' => {
+ * 'BazBar' => '>= 1.0.0'
+ * }
+ * }
+ * }
*
* @param array $extDependencies All extensions that depend on other ones
* @return array
diff --git a/includes/search/SearchIndexFieldDefinition.php b/includes/search/SearchIndexFieldDefinition.php
index 8a06b65ed7b..910fd77acc5 100644
--- a/includes/search/SearchIndexFieldDefinition.php
+++ b/includes/search/SearchIndexFieldDefinition.php
@@ -93,7 +93,7 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
public function merge( SearchIndexField $that ) {
// TODO: which definitions may be compatible?
if ( ( $that instanceof self ) && $this->type === $that->type &&
- $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
+ $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
) {
return $that;
}
diff --git a/includes/session/SessionManagerInterface.php b/includes/session/SessionManagerInterface.php
index 3ab0f431835..c6990fefe76 100644
--- a/includes/session/SessionManagerInterface.php
+++ b/includes/session/SessionManagerInterface.php
@@ -91,9 +91,9 @@ interface SessionManagerInterface extends LoggerAwareInterface {
*
* The return value is such that someone could theoretically do this:
* @code
- * foreach ( $provider->getVaryHeaders() as $header => $options ) {
- * $outputPage->addVaryHeader( $header, $options );
- * }
+ * foreach ( $provider->getVaryHeaders() as $header => $options ) {
+ * $outputPage->addVaryHeader( $header, $options );
+ * }
* @endcode
*
* @return array
diff --git a/includes/session/SessionProvider.php b/includes/session/SessionProvider.php
index 61c7500d05c..e8d81cbfba9 100644
--- a/includes/session/SessionProvider.php
+++ b/includes/session/SessionProvider.php
@@ -397,9 +397,9 @@ abstract class SessionProvider implements SessionProviderInterface, LoggerAwareI
*
* The return value is such that someone could theoretically do this:
* @code
- * foreach ( $provider->getVaryHeaders() as $header => $options ) {
- * $outputPage->addVaryHeader( $header, $options );
- * }
+ * foreach ( $provider->getVaryHeaders() as $header => $options ) {
+ * $outputPage->addVaryHeader( $header, $options );
+ * }
* @endcode
*
* @protected For use by \MediaWiki\Session\SessionManager only
diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index eef421c46ee..61d34c64957 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -324,12 +324,12 @@ abstract class BaseTemplate extends QuickTemplate {
*
* If a "data" key is present, it must be an array, where the keys represent
* the data-xxx properties with their provided values. For example,
- * $item['data'] = [
- * 'foo' => 1,
- * 'bar' => 'baz',
- * ];
+ * $item['data'] = [
+ * 'foo' => 1,
+ * 'bar' => 'baz',
+ * ];
* will render as element properties:
- * data-foo='1' data-bar='baz'
+ * data-foo='1' data-bar='baz'
*
* @param array $options Can be used to affect the output of a link.
* Possible options are:
diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php
index c3ee32120b2..fb8aa04aab0 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -702,7 +702,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
*/
protected function getFakeTemplate( $msg, $msgType ) {
global $wgAuth, $wgEnableEmail, $wgHiddenPrefs, $wgEmailConfirmToEdit, $wgEnableUserEmail,
- $wgSecureLogin, $wgPasswordResetRoutes;
+ $wgSecureLogin, $wgPasswordResetRoutes;
// make a best effort to get the value of fields which used to be fixed in the old login
// template but now might or might not exist depending on what providers are used
@@ -772,7 +772,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
$resetLink = $this->isSignup()
? null
: is_array( $wgPasswordResetRoutes )
- && in_array( true, array_values( $wgPasswordResetRoutes ), true );
+ && in_array( true, array_values( $wgPasswordResetRoutes ), true );
$template->set( 'header', '' );
$template->set( 'formheader', '' );
diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php
index 975e2107da6..72b956734c7 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -817,9 +817,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
function filterOnUserExperienceLevel( &$tables, &$conds, &$join_conds, $opts ) {
global $wgLearnerEdits,
- $wgExperiencedUserEdits,
- $wgLearnerMemberSince,
- $wgExperiencedUserMemberSince;
+ $wgExperiencedUserEdits,
+ $wgLearnerMemberSince,
+ $wgExperiencedUserMemberSince;
$selectedExpLevels = explode( ',', strtolower( $opts['userExpLevel'] ) );
// remove values that are not recognized
diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php
index a7a1c581cee..19850e6a2dd 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -95,9 +95,11 @@ class SpecialStatistics extends SpecialPage {
if ( !$msg->isDisabled() ) {
$descriptionHtml = $this->msg( 'parentheses' )->rawParams( $msg->parse() )
->escaped();
- $text .= "
" .
- Html::rawElement( 'small', [ 'class' => 'mw-statistic-desc' ],
- " $descriptionHtml" );
+ $text .= "
" . Html::rawElement(
+ 'small',
+ [ 'class' => 'mw-statistic-desc' ],
+ " $descriptionHtml"
+ );
}
}
diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php
index 8da15535b95..3467b49cae8 100644
--- a/includes/tidy/Balancer.php
+++ b/includes/tidy/Balancer.php
@@ -1824,7 +1824,7 @@ class Balancer {
* Regex borrowed from Tim Starling's "remex-html" project.
*/
const VALID_COMMENT_REGEX = "~ !--
- ( # 1. Comment match detector
+ ( # 1. Comment match detector
> | -> | # Invalid short close
( # 2. Comment contents
(?:
@@ -1839,15 +1839,15 @@ class Balancer {
( # 3. Comment close
--> | # Normal close
--!> | # Comment end bang
- ( # 4. Indicate matches requiring EOF
- --! | # EOF in comment end bang state
- -- | # EOF in comment end state
- - | # EOF in comment end dash state
- # EOF in comment state
+ ( # 4. Indicate matches requiring EOF
+ --! | # EOF in comment end bang state
+ -- | # EOF in comment end state
+ - | # EOF in comment end dash state
+ (?#nothing) # EOF in comment state
)
)
)
- ([^<]*) \z # 5. Non-tag text after the comment
+ ([^<]*) \z # 5. Non-tag text after the comment
~xs";
/**
diff --git a/includes/user/User.php b/includes/user/User.php
index d9c2a583208..e5107369fe4 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -3777,9 +3777,9 @@ class User implements IDBAccessObject {
*/
public function getExperienceLevel() {
global $wgLearnerEdits,
- $wgExperiencedUserEdits,
- $wgLearnerMemberSince,
- $wgExperiencedUserMemberSince;
+ $wgExperiencedUserEdits,
+ $wgLearnerMemberSince,
+ $wgExperiencedUserMemberSince;
if ( $this->isAnon() ) {
return false;
diff --git a/includes/utils/BatchRowIterator.php b/includes/utils/BatchRowIterator.php
index ef2c14a9b79..43bccba5718 100644
--- a/includes/utils/BatchRowIterator.php
+++ b/includes/utils/BatchRowIterator.php
@@ -230,7 +230,7 @@ class BatchRowIterator implements RecursiveIterator {
* `=` conditions while the final key uses a `>` condition
*
* Example output:
- * [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
+ * [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
*
* @return array The SQL conditions necessary to select the next set
* of rows in the batched query
diff --git a/includes/utils/MWCryptHKDF.php b/includes/utils/MWCryptHKDF.php
index 3bddd7794a6..1c8d4861afe 100644
--- a/includes/utils/MWCryptHKDF.php
+++ b/includes/utils/MWCryptHKDF.php
@@ -47,11 +47,11 @@ class MWCryptHKDF {
* From http://eprint.iacr.org/2010/264.pdf:
*
* The scheme HKDF is specifed as:
- * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
+ * HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
* where the values K(i) are defined as follows:
- * PRK = HMAC(XTS, SKM)
- * K(1) = HMAC(PRK, CTXinfo || 0);
- * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
+ * PRK = HMAC(XTS, SKM)
+ * K(1) = HMAC(PRK, CTXinfo || 0);
+ * K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
* where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits;
* the counter i is non-wrapping and of a given fixed size, e.g., a single byte.
* Note that the length of the HMAC output is the same as its key length and therefore
diff --git a/languages/Language.php b/languages/Language.php
index a1cc4bc9f2a..c1cb62c9534 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -2158,12 +2158,10 @@ class Language {
* the date preference they're supposed to use, it should be used in
* all children.
*
- *
- * function timeanddate([...], $format = true) {
- * $datePreference = $this->dateFormat($format);
- * [...]
- * }
- *
+ * function timeanddate([...], $format = true) {
+ * $datePreference = $this->dateFormat($format);
+ * [...]
+ * }
*
* @param int|string|bool $usePrefs If true, the user's preference is used
* if false, the site/language default is used
diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php
index 06fec448388..cef95524752 100644
--- a/languages/LanguageConverter.php
+++ b/languages/LanguageConverter.php
@@ -99,13 +99,13 @@ class LanguageConverter {
// '+' add rules for alltext
// 'E' the gave flags is error
// these flags above are reserved for program
- 'A' => 'A', // add rule for convert code (all text convert)
- 'T' => 'T', // title convert
- 'R' => 'R', // raw content
- 'D' => 'D', // convert description (subclass implement)
- '-' => '-', // remove convert (not implement)
- 'H' => 'H', // add rule for convert code (but no display in placed code)
- 'N' => 'N' // current variant name
+ 'A' => 'A', // add rule for convert code (all text convert)
+ 'T' => 'T', // title convert
+ 'R' => 'R', // raw content
+ 'D' => 'D', // convert description (subclass implement)
+ '-' => '-', // remove convert (not implement)
+ 'H' => 'H', // add rule for convert code (but no display in placed code)
+ 'N' => 'N', // current variant name
];
$this->mFlags = array_merge( $defaultflags, $flags );
foreach ( $this->mVariants as $v ) {
@@ -357,10 +357,10 @@ class LanguageConverter {
}
/* we convert everything except:
- 1. HTML markups (anything between < and >)
- 2. HTML entities
- 3. placeholders created by the parser
- */
+ * 1. HTML markups (anything between < and >)
+ * 2. HTML entities
+ * 3. placeholders created by the parser
+ */
$marker = '|' . Parser::MARKER_PREFIX . '[\-a-zA-Z0-9]+';
// this one is needed when the text is inside an HTML markup
@@ -1085,12 +1085,12 @@ class LanguageConverter {
// text should be splited by ";" only if a valid variant
// name exist after the markup, for example:
// -{zh-hans:xxx;zh-hant:\
- // yyy;}-
+ // yyy;}-
// we should split it as:
// [
- // [0] => 'zh-hans:xxx'
- // [1] => 'zh-hant:yyy'
- // [2] => ''
+ // [0] => 'zh-hans:xxx'
+ // [1] => 'zh-hant:yyy'
+ // [2] => ''
// ]
$pat = '/;\s*(?=';
foreach ( $this->mVariants as $variant ) {
diff --git a/languages/classes/LanguageKsh.php b/languages/classes/LanguageKsh.php
index 76568c26be0..9ef53e54590 100644
--- a/languages/classes/LanguageKsh.php
+++ b/languages/classes/LanguageKsh.php
@@ -63,13 +63,11 @@ class LanguageKsh extends Language {
*
* Possible values for the type of genitive are:
* Sing, Iehr prepositioned genitive = possessive dative
- * Vun, Fon, -omitted- postpositioned genitive
- * = preposition "vun" with dative
+ * Vun, Fon, -omitted- postpositioned genitive = preposition "vun" with dative
*
* Values of case overrides & prepositions, in the order of preceedence:
* Sing, Iehr possessive dative = prepositioned genitive
- * Vun, Fon preposition "vun" with dative
- * = postpositioned genitive
+ * Vun, Fon preposition "vun" with dative = postpositioned genitive
* En, em preposition "en" with dative
*
* Values for object gender specifiers of the possessive dative, or
diff --git a/languages/classes/LanguageLa.php b/languages/classes/LanguageLa.php
index d1963e1ad46..f4082af4ae1 100644
--- a/languages/classes/LanguageLa.php
+++ b/languages/classes/LanguageLa.php
@@ -50,12 +50,12 @@ class LanguageLa extends Language {
case 'genitive':
// only a few declensions, and even for those mostly the singular only
$in = [
- '/u[ms]$/', # 2nd declension singular
- '/ommunia$/', # 3rd declension neuter plural (partly)
- '/a$/', # 1st declension singular
+ '/u[ms]$/', # 2nd declension singular
+ '/ommunia$/', # 3rd declension neuter plural (partly)
+ '/a$/', # 1st declension singular
'/libri$/', '/nuntii$/', '/datae$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
];
$out = [
'i',
@@ -69,12 +69,12 @@ class LanguageLa extends Language {
case 'accusative':
// only a few declensions, and even for those mostly the singular only
$in = [
- '/u[ms]$/', # 2nd declension singular
- '/a$/', # 1st declension singular
- '/ommuniam$/', # 3rd declension neuter plural (partly)
+ '/u[ms]$/', # 2nd declension singular
+ '/a$/', # 1st declension singular
+ '/ommuniam$/', # 3rd declension neuter plural (partly)
'/libri$/', '/nuntii$/', '/datam$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
];
$out = [
'um',
@@ -88,12 +88,12 @@ class LanguageLa extends Language {
case 'ablative':
// only a few declensions, and even for those mostly the singular only
$in = [
- '/u[ms]$/', # 2nd declension singular
- '/ommunia$/', # 3rd declension neuter plural (partly)
- '/a$/', # 1st declension singular
- '/libri$/', '/nuntii$/', '/data$/', # 2nd declension plural (partly)
- '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
- '/es$/' # 5th declension singular
+ '/u[ms]$/', # 2nd declension singular
+ '/ommunia$/', # 3rd declension neuter plural (partly)
+ '/a$/', # 1st declension singular
+ '/libri$/', '/nuntii$/', '/data$/', # 2nd declension plural (partly)
+ '/tio$/', '/ns$/', '/as$/', # 3rd declension singular (partly)
+ '/es$/' # 5th declension singular
];
$out = [
'o',
diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php
index 689586b965e..b9280ea096c 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -105,7 +105,7 @@ $namespaceAliases = [];
* Example:
* @code
* $namespaceGenderAliases = [
- * NS_USER => [ 'male' => 'Male_user', 'female' => 'Female_user' ],
+ * NS_USER => [ 'male' => 'Male_user', 'female' => 'Female_user' ],
* ];
* @endcode
*/
diff --git a/maintenance/hhvm/makeRepo.php b/maintenance/hhvm/makeRepo.php
index a0fe381c79c..2a102b24869 100644
--- a/maintenance/hhvm/makeRepo.php
+++ b/maintenance/hhvm/makeRepo.php
@@ -106,7 +106,7 @@ class HHVMMakeRepo extends Maintenance {
$cmd = wfEscapeShellArg(
$hhvm,
'--hphp',
- '--target', 'hhbc',
+ '--target', 'hhbc',
'--format', 'binary',
'--force', '1',
'--keep-tempdir', '1',
diff --git a/maintenance/importImages.php b/maintenance/importImages.php
index 4a3d2d6bad7..23bdb3f4cac 100644
--- a/maintenance/importImages.php
+++ b/maintenance/importImages.php
@@ -497,7 +497,7 @@ class ImportImages extends Maintenance {
# (preferably batching files too).
private function getFileCommentFromSourceWiki( $wiki_host, $file ) {
$url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
- . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
+ . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
$body = Http::get( $url, [], __METHOD__ );
if ( preg_match( '##', $body, $matches ) == 0 ) {
return false;
@@ -508,7 +508,7 @@ class ImportImages extends Maintenance {
private function getFileUserFromSourceWiki( $wiki_host, $file ) {
$url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
- . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
+ . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
$body = Http::get( $url, [], __METHOD__ );
if ( preg_match( '##', $body, $matches ) == 0 ) {
return false;
diff --git a/maintenance/userDupes.inc b/maintenance/userDupes.inc
index 9893342dcf3..69c926584e3 100644
--- a/maintenance/userDupes.inc
+++ b/maintenance/userDupes.inc
@@ -195,7 +195,7 @@ class UserDupes {
"SELECT user_name,COUNT(*) AS n
FROM $user
GROUP BY user_name
- HAVING n > 1", __METHOD__ );
+ HAVING n > 1", __METHOD__ );
$list = [];
foreach ( $result as $row ) {
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css b/resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
index b791db80a8a..a6cd6508a0e 100644
--- a/resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
+++ b/resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
@@ -13,7 +13,7 @@
list-style: none none;
display: inline;
/* shared.css has some very weird directionality-specific rules for 'ul' we need to override,
- search for "Correct directionality when page dir is different from site/user dir" */
+ * search for "Correct directionality when page dir is different from site/user dir" */
margin: 0 !important;
padding: 0 !important;
}
diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
index d58eb2ed231..2afe286095e 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
@@ -112,16 +112,16 @@
// For example, see two groups with conflicts:
// userExpLevel: [
// {
- // name: 'experienced',
- // conflicts: [ 'unregistered' ]
+ // name: 'experienced',
+ // conflicts: [ 'unregistered' ]
// }
// ],
// registration: [
// {
- // name: 'registered',
+ // name: 'registered',
// },
// {
- // name: 'unregistered',
+ // name: 'unregistered',
// }
// ]
// If we select 'experienced', then 'unregistered' is in conflict (and vice versa),
diff --git a/resources/src/mediawiki.skinning/content.parsoid.less b/resources/src/mediawiki.skinning/content.parsoid.less
index b4fe934e528..0f8ae4582d0 100644
--- a/resources/src/mediawiki.skinning/content.parsoid.less
+++ b/resources/src/mediawiki.skinning/content.parsoid.less
@@ -88,8 +88,8 @@ figure[typeof*='mw:Image'] {
display: table-caption;
caption-side: bottom;
/* In mw-core the font-size is duplicated, 94% in thumbiner
- and again 94% in thumbcaption. 88% for font size of the
- caption results in the same behavior. */
+ * and again 94% in thumbcaption. 88% for font size of the
+ * caption results in the same behavior. */
font-size: 88%;
line-height: 1.4em;
text-align: left;
diff --git a/resources/src/mediawiki/mediawiki.storage.js b/resources/src/mediawiki/mediawiki.storage.js
index 2e09392436f..95c77f87044 100644
--- a/resources/src/mediawiki/mediawiki.storage.js
+++ b/resources/src/mediawiki/mediawiki.storage.js
@@ -42,12 +42,12 @@
};
/**
- * Set a value in device storage.
- *
- * @param {string} key Key name to store under
- * @param {string} value Value to be stored
- * @return {boolean} Whether the save succeeded or not
- */
+ * Set a value in device storage.
+ *
+ * @param {string} key Key name to store under
+ * @param {string} value Value to be stored
+ * @return {boolean} Whether the save succeeded or not
+ */
SafeStorage.prototype.set = function ( key, value ) {
try {
this.store.setItem( key, value );
@@ -57,11 +57,11 @@
};
/**
- * Remove a value from device storage.
- *
- * @param {string} key Key of item to remove
- * @return {boolean} Whether the save succeeded or not
- */
+ * Remove a value from device storage.
+ *
+ * @param {string} key Key of item to remove
+ * @return {boolean} Whether the save succeeded or not
+ */
SafeStorage.prototype.remove = function ( key ) {
try {
this.store.removeItem( key );
diff --git a/resources/src/mediawiki/page/gallery-slideshow.js b/resources/src/mediawiki/page/gallery-slideshow.js
index 3cb8e9d8e80..6e9ff0e7cdc 100644
--- a/resources/src/mediawiki/page/gallery-slideshow.js
+++ b/resources/src/mediawiki/page/gallery-slideshow.js
@@ -89,7 +89,7 @@
/**
* @property {jQuery} $container If the gallery contained in an element that is
- * not the main content element, then it stores that element.
+ * not the main content element, then it stores that element.
*/
/**
@@ -102,7 +102,7 @@
/**
* @property {number} imageHeight Height of the image based on viewport size
- * the URLs in the required size.
+ * the URLs in the required size.
*/
/* Setup */
diff --git a/tests/phpunit/autoload.ide.php b/tests/phpunit/autoload.ide.php
index 074fab09d15..106ab683175 100644
--- a/tests/phpunit/autoload.ide.php
+++ b/tests/phpunit/autoload.ide.php
@@ -86,9 +86,12 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
}
if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
- if ( $wgLocalisationCacheConf['storeClass'] === false
- && ( $wgLocalisationCacheConf['store'] == 'db'
- || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) )
+ if (
+ $wgLocalisationCacheConf['storeClass'] === false
+ && (
+ $wgLocalisationCacheConf['store'] == 'db'
+ || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory )
+ )
) {
$wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
}
diff --git a/tests/phpunit/includes/MWNamespaceTest.php b/tests/phpunit/includes/MWNamespaceTest.php
index 092d57b3aae..597765228b5 100644
--- a/tests/phpunit/includes/MWNamespaceTest.php
+++ b/tests/phpunit/includes/MWNamespaceTest.php
@@ -161,7 +161,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
public function testExists() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+ 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
);
}
*/
@@ -223,7 +223,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
public function testGetCanonicalNamespaces() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+ 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
);
}
*/
@@ -234,7 +234,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
public function testGetCanonicalName() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+ 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
);
}
*/
@@ -245,7 +245,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
public function testGetCanonicalIndex() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+ 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
);
}
*/
@@ -257,7 +257,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
public function testGetValidNamespaces() {
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
- 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+ 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
);
}
*/
diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php
index 2694b850a00..424218e6e11 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -315,14 +315,14 @@ class MessageTest extends MediaWikiLangTestCase {
return [
[ 'foo', 'parse', 'foo', 'foo' ],
[ 'foo', 'escaped', '<span>foo</span>',
- 'foo' ],
+ 'foo' ],
[ 'foo', 'plain', 'foo', 'foo' ],
[ '', 'parse', '<script>alert(1)</script>',
'<script>alert(1)</script>' ],
[ '', 'escaped', '<script>alert(1)</script>',
'<script>alert(1)</script>' ],
[ '', 'plain', '',
- '<script>alert(1)</script>' ],
+ '<script>alert(1)</script>' ],
];
}
diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php
index ae662532d8d..a3d1ddac316 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -434,8 +434,13 @@ class ContentHandlerTest extends MediaWikiTestCase {
$page = new WikiPage( $title );
$this->setTemporaryHook( 'SearchDataForIndex',
- function ( &$fields, ContentHandler $handler, WikiPage $page, ParserOutput $output,
- SearchEngine $engine ) {
+ function (
+ &$fields,
+ ContentHandler $handler,
+ WikiPage $page,
+ ParserOutput $output,
+ SearchEngine $engine
+ ) {
$fields['testDataField'] = 'test content';
} );
diff --git a/tests/phpunit/includes/db/LBFactoryTest.php b/tests/phpunit/includes/db/LBFactoryTest.php
index 4b857ceff92..8b285cbdf5d 100644
--- a/tests/phpunit/includes/db/LBFactoryTest.php
+++ b/tests/phpunit/includes/db/LBFactoryTest.php
@@ -157,12 +157,12 @@ class LBFactoryTest extends MediaWikiTestCase {
],
],
'serverTemplate' => [
- 'dbname' => $wgDBname,
- 'user' => $wgDBuser,
- 'password' => $wgDBpassword,
- 'type' => $wgDBtype,
+ 'dbname' => $wgDBname,
+ 'user' => $wgDBuser,
+ 'password' => $wgDBpassword,
+ 'type' => $wgDBtype,
'dbDirectory' => $wgSQLiteDataDir,
- 'flags' => DBO_DEFAULT
+ 'flags' => DBO_DEFAULT
],
'hostsByName' => [
'test-db1' => $wgDBserver,
diff --git a/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php b/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
index ebeb1092a6a..f722fe13f89 100644
--- a/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
+++ b/tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
@@ -27,7 +27,7 @@ class RESTBagOStuffTest extends MediaWikiTestCase {
$this->client->expects( $this->once() )->method( 'run' )->with( [
'method' => 'GET',
'url' => 'http://test/rest/42xyz42'
- // list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
+ // list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
] )->willReturn( [ 200, 'OK', [], 's:8:"somedata";', 0 ] );
$result = $this->bag->get( '42xyz42' );
$this->assertEquals( 'somedata', $result );
@@ -69,7 +69,7 @@ class RESTBagOStuffTest extends MediaWikiTestCase {
$this->client->expects( $this->once() )->method( 'run' )->with( [
'method' => 'PUT',
'url' => 'http://test/rest/42xyz42',
- 'body' => 's:8:"postdata";'
+ 'body' => 's:8:"postdata";'
// list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
] )->willReturn( [ 200, 'OK', [], 'Done', 0 ] );
$result = $this->bag->set( '42xyz42', 'postdata' );
diff --git a/tests/phpunit/includes/search/SearchIndexFieldTest.php b/tests/phpunit/includes/search/SearchIndexFieldTest.php
index ec046a767f4..9c10e499764 100644
--- a/tests/phpunit/includes/search/SearchIndexFieldTest.php
+++ b/tests/phpunit/includes/search/SearchIndexFieldTest.php
@@ -10,7 +10,7 @@ class SearchIndexFieldTest extends MediaWikiTestCase {
return [
[ 0, 'test', 0, 'test', true ],
[ SearchIndexField::INDEX_TYPE_NESTED, 'test',
- SearchIndexField::INDEX_TYPE_NESTED, 'test', false ],
+ SearchIndexField::INDEX_TYPE_NESTED, 'test', false ],
[ 0, 'test', 0, 'test2', true ],
[ 0, 'test', 1, 'test', false ],
];
diff --git a/tests/phpunit/includes/utils/UIDGeneratorTest.php b/tests/phpunit/includes/utils/UIDGeneratorTest.php
index 60d4e99978b..8b54b7221ab 100644
--- a/tests/phpunit/includes/utils/UIDGeneratorTest.php
+++ b/tests/phpunit/includes/utils/UIDGeneratorTest.php
@@ -45,7 +45,7 @@ class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
$last_timestamp_bin,
$timestamp_bin,
"timestamp ($timestamp_bin) of current ID ($id_bin) >= timestamp ($last_timestamp_bin) " .
- "of prior one ($lastId_bin)" );
+ "of prior one ($lastId_bin)" );
$hostbits_bin = substr( $id_bin, -$hostbits );
$last_hostbits_bin = substr( $lastId_bin, -$hostbits );
@@ -55,7 +55,7 @@ class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
$hostbits_bin,
$last_hostbits_bin,
"Host ID ($hostbits_bin) of current ID ($id_bin) is same as host ID ($last_hostbits_bin) " .
- "of prior one ($lastId_bin)." );
+ "of prior one ($lastId_bin)." );
}
$lastId = $id;
diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml
index 11a25c4105e..7babcacce00 100644
--- a/tests/phpunit/suite.xml
+++ b/tests/phpunit/suite.xml
@@ -35,8 +35,7 @@
structure
suites/LessTestSuite.php
-
+
maintenance