jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/357031 )

Change subject: Make phpcs pass - includes
......................................................................


Make phpcs pass - includes

Change-Id: If88c942df7281d32273a704eab8e8857e77378b3
---
M includes/ApiQueryMapData.php
M includes/DataModule.php
M includes/DataModuleLinks.php
M includes/Projection/Transformation.php
M includes/SimpleStyleParser.php
M includes/Tag/MapFrame.php
M includes/Tag/TagHandler.php
7 files changed, 23 insertions(+), 21 deletions(-)

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



diff --git a/includes/ApiQueryMapData.php b/includes/ApiQueryMapData.php
index 395958f..57030c5 100644
--- a/includes/ApiQueryMapData.php
+++ b/includes/ApiQueryMapData.php
@@ -2,7 +2,6 @@
 
 namespace Kartographer;
 
-
 use ApiBase;
 use ApiQuery;
 use ApiQueryBase;
diff --git a/includes/DataModule.php b/includes/DataModule.php
index b559ad6..1237331 100644
--- a/includes/DataModule.php
+++ b/includes/DataModule.php
@@ -15,18 +15,18 @@
 class DataModule extends ResourceLoaderModule {
 
        protected $origin = self::ORIGIN_USER_SITEWIDE;
-       protected $targets = array( 'desktop', 'mobile' );
+       protected $targets = [ 'desktop', 'mobile' ];
 
        public function getScript( ResourceLoaderContext $context ) {
                $config = $context->getResourceLoader()->getConfig();
-               return ResourceLoader::makeConfigSetScript( array(
+               return ResourceLoader::makeConfigSetScript( [
                        'wgKartographerMapServer' => $config->get( 
'KartographerMapServer' ),
                        'wgKartographerIconServer' => $config->get( 
'KartographerIconServer' ),
                        'wgKartographerSrcsetScales' => $config->get( 
'KartographerSrcsetScales' ),
                        'wgKartographerStyles' => $config->get( 
'KartographerStyles' ),
                        'wgKartographerDfltStyle' => $config->get( 
'KartographerDfltStyle' ),
                        'wgKartographerEnableMapFrame' => $config->get( 
'KartographerEnableMapFrame' ),
-               ) );
+               ] );
        }
 
        public function enableModuleContentVersion() {
diff --git a/includes/DataModuleLinks.php b/includes/DataModuleLinks.php
index e67010c..b366301 100644
--- a/includes/DataModuleLinks.php
+++ b/includes/DataModuleLinks.php
@@ -16,12 +16,12 @@
 class DataModuleLinks extends ResourceLoaderModule {
 
        protected $origin = self::ORIGIN_USER_SITEWIDE;
-       protected $targets = array( 'desktop', 'mobile' );
+       protected $targets = [ 'desktop', 'mobile' ];
 
        public function getScript( ResourceLoaderContext $context ) {
-               return ResourceLoader::makeConfigSetScript( array(
+               return ResourceLoader::makeConfigSetScript( [
                        'wgKartographerExternalLinks' => 
$this->getExternalLinks( $context )
-               ) );
+               ] );
        }
 
        public function getExternalLinks( ResourceLoaderContext $context ) {
@@ -51,7 +51,7 @@
                $data->types = array_unique( array_merge( $data->types, 
$allTypes ) );
 
                $data->localization = [];
-               foreach( $allTypes as $type ) {
+               foreach ( $allTypes as $type ) {
                        $data->localization[$type] = $context->msg( 
'kartographer-linktype-' . $type )->plain();
                }
 
diff --git a/includes/Projection/Transformation.php 
b/includes/Projection/Transformation.php
index 04d8380..bc6a08c 100644
--- a/includes/Projection/Transformation.php
+++ b/includes/Projection/Transformation.php
@@ -25,7 +25,7 @@
                $x = $point[0];
                $y = $point[1];
 
-               $x = $scale * ( self::A * $x + 0.5);
+               $x = $scale * ( self::A * $x + 0.5 );
                $y = $scale * ( self::C * $y + 0.5 );
 
                return [ $x, $y ];
diff --git a/includes/SimpleStyleParser.php b/includes/SimpleStyleParser.php
index d95343e..8fe0b6e 100644
--- a/includes/SimpleStyleParser.php
+++ b/includes/SimpleStyleParser.php
@@ -145,7 +145,6 @@
                return $firstMarker;
        }
 
-
        /**
         * @param mixed $json
         * @return Status
diff --git a/includes/Tag/MapFrame.php b/includes/Tag/MapFrame.php
index 145162b..5e88ac8 100644
--- a/includes/Tag/MapFrame.php
+++ b/includes/Tag/MapFrame.php
@@ -112,7 +112,7 @@
                                                $width = '300px'; // @todo: 
deprecate old syntax completely
                                                $staticWidth = 300;
                                        }
-                               } else if ( $width === 'full' ) {
+                               } elseif ( $width === 'full' ) {
                                        $width = '100%';
                                        $fullWidth = true;
                                        $staticWidth = 800;
diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index dafa75e..cf46bff 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php
@@ -106,7 +106,7 @@
         * @param PPFrame $frame
         * @return string
         */
-       private final function handle( $input, array $args, Parser $parser, 
PPFrame $frame ) {
+       final private function handle( $input, array $args, Parser $parser, 
PPFrame $frame ) {
                $this->parser = $parser;
                $this->frame = $frame;
                $output = $parser->getOutput();
@@ -169,7 +169,7 @@
         * When overridden in a descendant class, returns tag HTML
         * @return string
         */
-       protected abstract function render();
+       abstract protected function render();
 
        private function parseGroups() {
                global $wgKartographerWikivoyageMode;
@@ -243,7 +243,6 @@
 
                return $value;
        }
-
 
        protected function saveData() {
                $this->state->addRequestedGroups( $this->showGroups );
@@ -369,16 +368,21 @@
                $message = count( $errors ) > 1 ? 
'kartographer-error-context-multi'
                        : 'kartographer-error-context';
                // Status sucks, redoing a bunch of its code here
-               $errorText = implode( "\n* ", array_map( function( array $err ) 
{
-                               return wfMessage( $err['message'] )
-                                       ->params( $err['params'] )
-                                       ->inLanguage( $this->getLanguage() )
-                                       ->plain();
-                       }, $errors ) );
+               $errorText = implode( "\n* ",
+                       array_map(
+                               function( array $err ) {
+                                       return wfMessage( $err['message'] )
+                                               ->params( $err['params'] )
+                                               ->inLanguage( 
$this->getLanguage() )
+                                               ->plain();
+                               },
+                               $errors
+                       )
+               );
                if ( count( $errors ) > 1 ) {
                        $errorText = '* ' . $errorText;
                }
-               return Html::rawElement( 'div', array( 'class' => 
'mw-kartographer-error' ),
+               return Html::rawElement( 'div', [ 'class' => 
'mw-kartographer-error' ],
                        wfMessage( $message, $this->tag, $errorText 
)->inLanguage( $this->getLanguage() )->parse() );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If88c942df7281d32273a704eab8e8857e77378b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to