build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0
[lhc/web/wiklou.git] / tests / phpunit / includes / api / RandomImageGenerator.php
index 62e175b..50a59f9 100644 (file)
@@ -87,7 +87,7 @@ class RandomImageGenerator {
                                        __DIR__ . '/words.txt'
                                ] as $dictionaryFile
                        ) {
-                               if ( is_file( $dictionaryFile ) and is_readable( $dictionaryFile ) ) {
+                               if ( is_file( $dictionaryFile ) && is_readable( $dictionaryFile ) ) {
                                        $this->dictionaryFile = $dictionaryFile;
                                        break;
                                }
@@ -218,7 +218,7 @@ class RandomImageGenerator {
        }
 
        /**
-        * Given array( array('x' => 10, 'y' => 20), array( 'x' => 30, y=> 5 ) )
+        * Given [ [ 'x' => 10, 'y' => 20 ], [ 'x' => 30, y=> 5 ] ]
         * returns "10,20 30,5"
         * Useful for SVG and imagemagick command line arguments
         * @param array $shape Array of arrays, each array containing x & y keys mapped to numeric values
@@ -230,7 +230,7 @@ class RandomImageGenerator {
                        $points[] = $point['x'] . ',' . $point['y'];
                }
 
-               return join( " ", $points );
+               return implode( " ", $points );
        }
 
        /**
@@ -425,12 +425,12 @@ class RandomImageGenerator {
                        $components[] = mt_rand( 0, 255 );
                }
 
-               return 'rgb(' . join( ', ', $components ) . ')';
+               return 'rgb(' . implode( ', ', $components ) . ')';
        }
 
        /**
         * Get an array of random pairs of random words, like
-        * array( array( 'foo', 'bar' ), array( 'quux', 'baz' ) );
+        * [ [ 'foo', 'bar' ], [ 'quux', 'baz' ] ];
         *
         * @param int $number Number of pairs
         * @return array Two-element arrays