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

Change subject: Fixup mixed leading whitespace
......................................................................


Fixup mixed leading whitespace

Minor comment and casing fixes.  Remove unnecessary global.

Change-Id: Iaf5ab35f0c0513a906531cda29bdadf71b4574b9
---
M GuidedTourHooks.php
M includes/ResourceLoaderGuidedTourSiteStylesModule.php
2 files changed, 15 insertions(+), 10 deletions(-)

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



diff --git a/GuidedTourHooks.php b/GuidedTourHooks.php
index 398c3a3..9a26b85 100644
--- a/GuidedTourHooks.php
+++ b/GuidedTourHooks.php
@@ -94,17 +94,16 @@
         * @param OutputPage $out output page
         * @param string $tourName the tour name, such as 'gettingstarted'
         *
-        * @return true if a module was added, false otherwise
+        * @return bool true if a module was added, false otherwise
         */
        private static function addTour( $out, $tourName ) {
                global $wgResourceModules;
 
                // Exclude '-' because MediaWiki message keys use it as a 
separator after the tourname.
                // Exclude '.' because module names use it as a separator.
-
                // "User JS" refers to on-wiki JavaScript.  In theory we could 
still add
                // extension-defined tours, but it's more conservative not to.
-               if ( $out->isUserJsAllowed() && $tourName !== NULL && strpbrk( 
$tourName, '-.' ) === FALSE ) {
+               if ( $out->isUserJsAllowed() && $tourName !== null && strpbrk( 
$tourName, '-.' ) === false ) {
                        $tourModuleName = "ext.guidedTour.tour.$tourName";
                        if ( isset ( $wgResourceModules[$tourModuleName] ) ) {
                                // Add the tour itself for extension-defined 
tours.
@@ -140,7 +139,6 @@
         * @return bool true in all cases
         */
        public static function onBeforePageDisplay( $out, $skin ) {
-               global $wgResourceModules;
                // test for tour enabled in url first
                $request = $out->getRequest();
                $queryTourName = $request->getVal( self::TOUR_PARAM );
@@ -180,12 +178,16 @@
         * @param array &$files test files
         * @return bool always true
         */
-        public static function onUnitTestsList( &$files ) {
-                $testDir = __DIR__ . '/tests';
-                $files = array_merge( $files, glob( "$testDir/*Test.php" ) );
-                return true;
-        }
+       public static function onUnitTestsList( &$files ) {
+               $testDir = __DIR__ . '/tests';
+               $files = array_merge( $files, glob( "$testDir/*Test.php" ) );
+               return true;
+       }
 
+       /**
+        * @param $redirectParams array
+        * @return bool
+        */
        public static function onRedirectSpecialArticleRedirectParams( 
&$redirectParams ) {
                array_push( $redirectParams, self::TOUR_PARAM, 'step' );
 
diff --git a/includes/ResourceLoaderGuidedTourSiteStylesModule.php 
b/includes/ResourceLoaderGuidedTourSiteStylesModule.php
index 67bbe20..a61c1da 100644
--- a/includes/ResourceLoaderGuidedTourSiteStylesModule.php
+++ b/includes/ResourceLoaderGuidedTourSiteStylesModule.php
@@ -23,7 +23,10 @@
                );
        }
 
-       // Load custom CSS after all other Guiders and GuidedTour CSS.
+       /**
+        * Load custom CSS after all other Guiders and GuidedTour CSS.
+        * @return Array
+        */
        public function getDependencies() {
                return array(
                        'ext.guidedTour.styles',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf5ab35f0c0513a906531cda29bdadf71b4574b9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Swalling <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to