jenkins-bot has submitted this change and it was merged.

Change subject: Fix CodeSniffer errors and warnings
......................................................................


Fix CodeSniffer errors and warnings

More fixes will be submitted upstream.

Change-Id: Ib22997f8756537b063fd6eed3f1f74f3eda315d7
---
M data/LanguageNameSearch.php
M data/fontrepo/scripts/compile.php
M resources/css/ext.uls.css
M resources/css/ext.uls.displaysettings.css
M tests/phpunit/LanguageSearchTest.php
5 files changed, 10 insertions(+), 9 deletions(-)

Approvals:
  Nikerabbit: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/data/LanguageNameSearch.php b/data/LanguageNameSearch.php
index 6d882ec..3aa5e7b 100644
--- a/data/LanguageNameSearch.php
+++ b/data/LanguageNameSearch.php
@@ -18,7 +18,7 @@
  * @licence MIT License
  */
 class LanguageNameSearch {
-       static $languagenames;
+       protected static $languagenames;
 
        public static function init() {
                self::$languagenames = unserialize( file_get_contents( __DIR__ 
. '/langnames.ser' ) );
@@ -74,11 +74,12 @@
        static function getCodepoint( $str ) {
                $values = array();
                $lookingFor = 1;
-               for ( $i = 0; $i < strlen( $str ); $i++ ) {
+               $strLen = strlen( $str );
+               for ( $i = 0; $i < $strLen; $i++ ) {
                        $thisValue = ord( $str[$i] );
                        if ( $thisValue < 128 ) {
                                return $thisValue;
-                       } else { // Codepoints larger than 127 are represented 
by multi-byte sequences,
+                       } else { // Codepoints larger than 127 are represented 
by multi-byte sequences
                                if ( count( $values ) === 0 ) {
                                        // 224 is the lowest 
non-overlong-encoded codepoint.
                                        $lookingFor = ( $thisValue < 224 ) ? 2 
: 3;
diff --git a/data/fontrepo/scripts/compile.php 
b/data/fontrepo/scripts/compile.php
index 6f3c19d..3472909 100644
--- a/data/fontrepo/scripts/compile.php
+++ b/data/fontrepo/scripts/compile.php
@@ -51,7 +51,7 @@
                $dir = dirname( $inifile );
 
                if ( isset( $font['ttf'] ) ) {
-                       $list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'] ;
+                       $list['fonts'][$fontname]['ttf'] = basename( $dir ) . 
'/' . $font['ttf'];
                }
                if ( isset( $font['svg'] ) ) {
                        $list['fonts'][$fontname]['svg'] = basename( $dir ) . 
'/' . $font['svg'];
@@ -89,7 +89,7 @@
 
 $json = json_encode( $list );
 $js = <<<JAVASCRIPT
-// Please do not edit. This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
+// Do not edit! This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
 ( function ( $ ) {
        $.webfonts = $.webfonts || {};
        $.webfonts.repository = $json;
diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css
index 9d83e43..8da64e5 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.css
@@ -32,8 +32,8 @@
 /* RTL text direction here (bug 45142). x:-o-prefocus won't match anything, */
 /* but will make other browsers ignore this rule. */
 x:-o-prefocus, body.rtl li#pt-uls {
-  /* @noflip */
-  direction: ltr;
+       /* @noflip */
+       direction: ltr;
 }
 
 #settings-block {
diff --git a/resources/css/ext.uls.displaysettings.css 
b/resources/css/ext.uls.displaysettings.css
index 5bc84b1..52cbb95 100644
--- a/resources/css/ext.uls.displaysettings.css
+++ b/resources/css/ext.uls.displaysettings.css
@@ -67,7 +67,7 @@
 .uls-font-item {
        border-bottom: 1px solid #EEEEEE;
        background: #FBFBFB;
-       margin: 0 ;
+       margin: 0;
        padding: 10px 0;
 }
 
diff --git a/tests/phpunit/LanguageSearchTest.php 
b/tests/phpunit/LanguageSearchTest.php
index f0c3a81..a543e8e 100644
--- a/tests/phpunit/LanguageSearchTest.php
+++ b/tests/phpunit/LanguageSearchTest.php
@@ -17,7 +17,7 @@
  * @licence GNU General Public Licence 2.0 or later
  * @licence MIT License
  */
-require_once( __DIR__ . '/../../data/LanguageNameSearch.php' );
+require_once __DIR__ . '/../../data/LanguageNameSearch.php';
 class LanguageSearchTest extends PHPUnit_Framework_TestCase {
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/77299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib22997f8756537b063fd6eed3f1f74f3eda315d7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to