Make lines short to pass phpcs in media tests PHP files
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Wed, 30 Sep 2015 06:15:48 +0000 (09:15 +0300)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Thu, 1 Oct 2015 19:40:31 +0000 (19:40 +0000)
Some lines that weren't too long are also broken up
for consistency and readability.

Bug: T102614
Change-Id: I36e3225e135b58bc22705afbb888b06f93b5a9a8

tests/phpunit/includes/media/ExifBitmapTest.php
tests/phpunit/includes/media/FormatMetadataTest.php

index adbc977..078c842 100644 (file)
@@ -148,7 +148,9 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
         * @dataProvider provideSwappingICCProfile
         * @covers BitmapHandler::swapICCProfile
         */
-       public function testSwappingICCProfile( $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName ) {
+       public function testSwappingICCProfile(
+               $sourceFilename, $controlFilename, $newProfileFilename, $oldProfileName
+       ) {
                global $wgExiftool;
 
                if ( !$wgExiftool || !is_file( $wgExiftool ) ) {
@@ -167,17 +169,35 @@ class ExifBitmapTest extends MediaWikiMediaTestCase {
                $file = $this->dataFile( $sourceFilename, 'image/jpeg' );
                $this->handler->swapICCProfile( $filepath, $oldProfileName, $profileFilepath );
 
-               $this->assertEquals( sha1( file_get_contents( $filepath ) ), sha1( file_get_contents( $controlFilepath ) ) );
+               $this->assertEquals(
+                       sha1( file_get_contents( $filepath ) ),
+                       sha1( file_get_contents( $controlFilepath ) )
+               );
        }
 
        public function provideSwappingICCProfile() {
                return array(
                        // File with sRGB should end up with TinyRGB
-                       array( 'srgb.jpg', 'tinyrgb.jpg', 'tinyrgb.icc', 'IEC 61966-2.1 Default RGB colour space - sRGB' ),
+                       array(
+                               'srgb.jpg',
+                               'tinyrgb.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       ),
                        // File with TinyRGB should be left unchanged
-                       array( 'tinyrgb.jpg', 'tinyrgb.jpg', 'tinyrgb.icc', 'IEC 61966-2.1 Default RGB colour space - sRGB' ),
+                       array(
+                               'tinyrgb.jpg',
+                               'tinyrgb.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       ),
                        // File with no profile should be left unchanged
-                       array( 'test.jpg', 'test.jpg', 'tinyrgb.icc', 'IEC 61966-2.1 Default RGB colour space - sRGB' )
+                       array(
+                               'test.jpg',
+                               'test.jpg',
+                               'tinyrgb.icc',
+                               'IEC 61966-2.1 Default RGB colour space - sRGB'
+                       )
                );
        }
 }
index b666c83..22383e1 100644 (file)
@@ -53,17 +53,45 @@ class FormatMetadataTest extends MediaWikiMediaTestCase {
 
        public function provideResolveMultivalueValue() {
                return array(
-                       'nonArray' => array( 'foo', 'foo' ),
-                       'multiValue' => array( array( 'first', 'second', 'third', '_type' => 'ol' ), 'first' ),
-                       'noType' => array( array( 'first', 'second', 'third' ), 'first' ),
-                       'typeFirst' => array( array( '_type' => 'ol', 'first', 'second', 'third' ), 'first' ),
+                       'nonArray' => array(
+                               'foo',
+                               'foo'
+                       ),
+                       'multiValue' => array(
+                               array( 'first', 'second', 'third', '_type' => 'ol' ),
+                               'first'
+                       ),
+                       'noType' => array(
+                               array( 'first', 'second', 'third' ),
+                               'first'
+                       ),
+                       'typeFirst' => array(
+                               array( '_type' => 'ol', 'first', 'second', 'third' ),
+                               'first'
+                       ),
                        'multilang' => array(
-                               array( 'en' => 'first', 'de' => 'Erste', '_type' => 'lang' ),
-                               array( 'en' => 'first', 'de' => 'Erste', '_type' => 'lang' ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
                        ),
                        'multilang-multivalue' => array(
-                               array( 'en' => array( 'first', 'second' ), 'de' => array( 'Erste', 'Zweite' ), '_type' => 'lang' ),
-                               array( 'en' => 'first', 'de' => 'Erste', '_type' => 'lang' ),
+                               array(
+                                       'en' => array( 'first', 'second' ),
+                                       'de' => array( 'Erste', 'Zweite' ),
+                                       '_type' => 'lang'
+                               ),
+                               array(
+                                       'en' => 'first',
+                                       'de' => 'Erste',
+                                       '_type' => 'lang'
+                               ),
                        ),
                );
        }