jenkins-bot has submitted this change and it was merged.
Change subject: Pass phpcs-strict on includes/libs/CSSJanus.php
......................................................................
Pass phpcs-strict on includes/libs/CSSJanus.php
Change-Id: I184a419a225d5503c5b72909bd69624eba690b0e
---
M RELEASE-NOTES-1.24
M includes/AutoLoader.php
M includes/libs/CSSJanus.php
3 files changed, 28 insertions(+), 14 deletions(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index fd422fa..48ea3d4 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -38,6 +38,7 @@
* CLDRPluralRuleConverter_Fragment to CLDRPluralRuleConverterFragment
* CLDRPluralRuleConverter_Operator to CLDRPluralRuleConverterOperator
* CLDRPluralRuleEvaluator_Range to CLDRPluralRuleEvaluatorRange
+* CSSJanus_Tokenizer to CSSJanusTokenizer
== Compatibility ==
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 5545767..d3aabfe 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -676,7 +676,7 @@
# includes/libs
'CSSJanus' => 'includes/libs/CSSJanus.php',
- 'CSSJanus_Tokenizer' => 'includes/libs/CSSJanus.php',
+ 'CSSJanusTokenizer' => 'includes/libs/CSSJanus.php',
'CSSMin' => 'includes/libs/CSSMin.php',
'GenericArrayObject' => 'includes/libs/GenericArrayObject.php',
'HashRing' => 'includes/libs/HashRing.php',
diff --git a/includes/libs/CSSJanus.php b/includes/libs/CSSJanus.php
index 0063a9b..4f0651d 100644
--- a/includes/libs/CSSJanus.php
+++ b/includes/libs/CSSJanus.php
@@ -93,6 +93,7 @@
return;
}
+ // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
$patterns =& self::$patterns;
$patterns['escape'] =
"(?:{$patterns['unicode']}|\\[^\r\n\f0-9a-f])";
$patterns['nmstart'] =
"(?:[_a-z]|{$patterns['nonAscii']}|{$patterns['escape']})";
@@ -127,6 +128,7 @@
// callback's job more straightforward
$patterns['bg_horizontal_percentage'] =
"/(background(?:-position)?\s*:\s*[^%]*?)(-?{$patterns['num']})(%\s*(?:{$patterns['quantity']}|{$patterns['ident']}))/";
$patterns['bg_horizontal_percentage_x'] =
"/(background-position-x\s*:\s*)(-?{$patterns['num']})(%)/";
+ // @codingStandardsIgnoreEnd
}
/**
@@ -145,15 +147,15 @@
self::buildPatterns();
// Tokenize single line rules with /* @noflip */
- $noFlipSingle = new CSSJanus_Tokenizer(
self::$patterns['noflip_single'], '`NOFLIP_SINGLE`' );
+ $noFlipSingle = new CSSJanusTokenizer(
self::$patterns['noflip_single'], '`NOFLIP_SINGLE`' );
$css = $noFlipSingle->tokenize( $css );
// Tokenize class rules with /* @noflip */
- $noFlipClass = new CSSJanus_Tokenizer(
self::$patterns['noflip_class'], '`NOFLIP_CLASS`' );
+ $noFlipClass = new CSSJanusTokenizer(
self::$patterns['noflip_class'], '`NOFLIP_CLASS`' );
$css = $noFlipClass->tokenize( $css );
// Tokenize comments
- $comments = new CSSJanus_Tokenizer( self::$patterns['comment'],
'`C`' );
+ $comments = new CSSJanusTokenizer( self::$patterns['comment'],
'`C`' );
$css = $comments->tokenize( $css );
// LTR->RTL fixes start here
@@ -308,17 +310,28 @@
}
};
- $css = preg_replace_callback( self::$patterns['box_shadow'],
function ( $matches ) use ( $flipSign ) {
- return $matches[1] . $flipSign( $matches[2] );
- }, $css );
+ $css = preg_replace_callback(
+ self::$patterns['box_shadow'], function ( $matches )
use ( $flipSign ) {
+ return $matches[1] . $flipSign( $matches[2] );
+ },
+ $css
+ );
- $css = preg_replace_callback( self::$patterns['text_shadow1'],
function ( $matches ) use ( $flipSign ) {
- return $matches[1] . $matches[2] . $matches[3] .
$flipSign( $matches[4] );
- }, $css );
+ $css = preg_replace_callback(
+ self::$patterns['text_shadow1'],
+ function ( $matches ) use ( $flipSign ) {
+ return $matches[1] . $matches[2] . $matches[3]
. $flipSign( $matches[4] );
+ },
+ $css
+ );
- $css = preg_replace_callback( self::$patterns['text_shadow2'],
function ( $matches ) use ( $flipSign ) {
- return $matches[1] . $flipSign( $matches[2] );
- }, $css );
+ $css = preg_replace_callback(
+ self::$patterns['text_shadow2'],
+ function ( $matches ) use ( $flipSign ) {
+ return $matches[1] . $flipSign( $matches[2] );
+ },
+ $css
+ );
return $css;
}
@@ -359,7 +372,7 @@
* to protect from being janused.
* @author Roan Kattouw
*/
-class CSSJanus_Tokenizer {
+class CSSJanusTokenizer {
private $regex, $token;
private $originals;
--
To view, visit https://gerrit.wikimedia.org/r/129544
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I184a419a225d5503c5b72909bd69624eba690b0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits