Merge "Have SquidUpdate::newFromTitles use getSquidURLs"
[lhc/web/wiklou.git] / tests / phpunit / includes / api / RandomImageGenerator.php
index 328ea8e..e27ba1c 100644 (file)
@@ -256,7 +256,8 @@ class RandomImageGenerator {
                        $shape->addAttribute( 'points', self::shapePointsToString( $drawSpec['shape'] ) );
                }
 
-               if ( !$fh = fopen( $filename, 'w' ) ) {
+               $fh = fopen( $filename, 'w' );
+               if ( !$fh ) {
                        throw new Exception( "couldn't open $filename for writing" );
                }
                fwrite( $fh, $svg->asXML() );
@@ -328,7 +329,7 @@ class RandomImageGenerator {
         * This is used when simulating a rotated image capture with Exif orientation
         * @param array $spec Returned by getImageSpec
         * @param array $matrix 2x2 transformation matrix
-        * @return array transformed Spec
+        * @return array Transformed Spec
         */
        private static function rotateImageSpec( &$spec, $matrix ) {
                $tSpec = array();
@@ -367,7 +368,7 @@ class RandomImageGenerator {
         * @param array $matrix 2x2 rotation matrix
         * @param int $x The x-coordinate number
         * @param int $y The y-coordinate number
-        * @return Transformed with properties x, y
+        * @return array Transformed with properties x, y
         */
        private static function matrixMultiply2x2( $matrix, $x, $y ) {
                return array(
@@ -432,7 +433,7 @@ class RandomImageGenerator {
         * array( array( 'foo', 'bar' ), array( 'quux', 'baz' ) );
         *
         * @param int $number Number of pairs
-        * @return array two-element arrays
+        * @return array Two-element arrays
         */
        private function getRandomWordPairs( $number ) {
                $lines = $this->getRandomLines( $number * 2 );
@@ -454,7 +455,7 @@ class RandomImageGenerator {
         * @param int $number_desired Number of lines desired
         *
         * @throws Exception
-        * @return Array of exactly n elements, drawn randomly from lines the file
+        * @return array Array of exactly n elements, drawn randomly from lines the file
         */
        private function getRandomLines( $number_desired ) {
                $filepath = $this->dictionaryFile;