Merge "Fix phpcs errors and warnings in includes/filerepo"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 15 Mar 2015 02:42:13 +0000 (02:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 15 Mar 2015 02:42:13 +0000 (02:42 +0000)
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderImage.php
includes/resourceloader/ResourceLoaderImageModule.php

index 1922999..1744aa1 100644 (file)
@@ -854,9 +854,11 @@ class ResourceLoader {
                $states = array();
 
                if ( !count( $modules ) && !count( $missing ) ) {
-                       return "/* This file is the Web entry point for MediaWiki's ResourceLoader:
+                       return <<<MESSAGE
+/* This file is the Web entry point for MediaWiki's ResourceLoader:
    <https://www.mediawiki.org/wiki/ResourceLoader>. In this request,
-   no modules were requested. Max made me put this here. */";
+   no modules were requested. Max made me put this here. */
+MESSAGE;
                }
 
                $image = $context->getImageObj();
index c6e345f..4a1f409 100644 (file)
@@ -349,7 +349,12 @@ class ResourceLoaderImage {
                        }
 
                        $handler = new SvgHandler;
-                       $res = $handler->rasterize( $tempFilenameSvg, $tempFilenamePng, $metadata['width'], $metadata['height'] );
+                       $res = $handler->rasterize(
+                               $tempFilenameSvg,
+                               $tempFilenamePng,
+                               $metadata['width'],
+                               $metadata['height']
+                       );
                        unlink( $tempFilenameSvg );
 
                        $png = null;
index 67806ff..8fbe497 100644 (file)
@@ -59,11 +59,13 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
         *         'prefix' => [CSS class prefix],
         *         // List of variants that may be used for the image files
         *         'variants' => array(
-        *             // ([image type] is a string, used in generated CSS class names and to match variants to images)
+        *             // ([image type] is a string, used in generated CSS class
+        *             //  names and to match variants to images)
         *             [image type] => array(
         *                 [variant name] => array(
         *                     'color' => [color string, e.g. '#ffff00'],
-        *                     'global' => [boolean, if true, this variant is available for all images of this type],
+        *                     'global' => [boolean, if true, this variant is available
+        *                                  for all images of this type],
         *                 ),
         *             )
         *         ),
@@ -73,7 +75,8 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
         *                 [file path string],
         *                 [file path string] => array(
         *                     'name' => [image name string, defaults to file name],
-        *                     'variants' => [array of variant name strings, variants available for this image],
+        *                     'variants' => [array of variant name strings, variants
+        *                                    available for this image],
         *                 ),
         *             )
         *         ),
@@ -167,7 +170,13 @@ class ResourceLoaderImageModule extends ResourceLoaderModule {
                                                $variantConfig = array();
                                        }
 
-                                       $image = new ResourceLoaderImage( $name, $this->getName(), $imageDesc, $this->localBasePath, $variantConfig );
+                                       $image = new ResourceLoaderImage(
+                                               $name,
+                                               $this->getName(),
+                                               $imageDesc,
+                                               $this->localBasePath,
+                                               $variantConfig
+                                       );
                                        $this->imageObjects[ $image->getName() ] = $image;
                                }
                        }