Completed
Branch master (18a9d3)
by Bjørn
05:13
created
build-tests-webp-convert/WebPConvertBuildTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
                 'aboutToServeImageCallBack' => function($servingWhat, $whyServingThis, $obj) {
31 31
                     return false;
32 32
                 },
33
-                'aboutToPerformFailActionCallback' => function ($errorTitle, $errorDescription, $actionAboutToBeTaken, $serveConvertedObj) {
33
+                'aboutToPerformFailActionCallback' => function($errorTitle, $errorDescription, $actionAboutToBeTaken, $serveConvertedObj) {
34 34
                     return false;
35 35
                 }
36 36
             ]
Please login to merge, or discard this patch.
build-scripts/PHPMerger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
             // load dirs in defined order. No recursion.
29 29
             foreach ($def['dirs'] as $dir) {
30
-                $dirAbs = __DIR__  . '/' . $def['root'] . '/' . $dir;
30
+                $dirAbs = __DIR__ . '/' . $def['root'] . '/' . $dir;
31 31
                 $files = glob($dirAbs . '/*.php');
32 32
                 foreach ($files as $file) {
33 33
                     // only require files that begins with uppercase (A-Z)
Please login to merge, or discard this patch.
build-scripts/generate-require-all.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         // load dirs in defined order. No recursion.
31 31
         foreach ($def['dirs'] as $dir) {
32
-            $dirAbs = __DIR__  . '/' . $def['dir'] . '/' . $dir;
32
+            $dirAbs = __DIR__ . '/' . $def['dir'] . '/' . $dir;
33 33
 
34 34
             $files = glob($dirAbs . '/*.php');
35 35
             foreach ($files as $file) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         // generate file
57 57
         $my_file = __DIR__ . '/' . $def['destination'];
58
-        $handle = fopen($my_file, 'w') or die('Cannot open file:  '.$my_file);
58
+        $handle = fopen($my_file, 'w') or die('Cannot open file:  ' . $my_file);
59 59
         fwrite($handle, $data);
60 60
 
61 61
         echo "'" . $my_file . "' was generated\n";
Please login to merge, or discard this patch.
build/webp-on-demand-2.inc 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
         }
899 899
 
900 900
         if (!$success && $options['try-supplied-binary-for-os']) {
901
-          // Try supplied binary (if available for OS, and hash is correct)
901
+            // Try supplied binary (if available for OS, and hash is correct)
902 902
             if (isset(self::$suppliedBinariesInfo[PHP_OS])) {
903 903
                 $info = self::$suppliedBinariesInfo[PHP_OS];
904 904
 
@@ -1315,10 +1315,10 @@  discard block
 block discarded – undo
1315 1315
                     //prevent blending with default black
1316 1316
                     imagealphablending($dst, false);
1317 1317
 
1318
-                     //change the RGB values if you need, but leave alpha at 127
1318
+                        //change the RGB values if you need, but leave alpha at 127
1319 1319
                     $transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);
1320 1320
 
1321
-                     //simpler than flood fill
1321
+                        //simpler than flood fill
1322 1322
                     imagefilledrectangle($dst, 0, 0, imagesx($image), imagesy($image), $transparent);
1323 1323
                     imagealphablending($dst, true);     //restore default blending
1324 1324
 
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
             if (($uploadMaxSize !== false) && ($uploadMaxSize < $fileSize)) {
65 65
                 throw new ConversionFailedException(
66 66
                     'File is larger than your max upload (set in your php.ini). File size:' .
67
-                        round($fileSize/1024) . ' kb. ' .
67
+                        round($fileSize / 1024) . ' kb. ' .
68 68
                         'upload_max_filesize in php.ini: ' . ini_get('upload_max_filesize') .
69
-                        ' (parsed as ' . round($uploadMaxSize/1024) . ' kb)'
69
+                        ' (parsed as ' . round($uploadMaxSize / 1024) . ' kb)'
70 70
                 );
71 71
             }
72 72
 
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
             if (($postMaxSize !== false) && ($postMaxSize < $fileSize)) {
75 75
                 throw new ConversionFailedException(
76 76
                     'File is larger than your post_max_size limit (set in your php.ini). File size:' .
77
-                        round($fileSize/1024) . ' kb. ' .
77
+                        round($fileSize / 1024) . ' kb. ' .
78 78
                         'post_max_size in php.ini: ' . ini_get('post_max_size') .
79
-                        ' (parsed as ' . round($postMaxSize/1024) . ' kb)'
79
+                        ' (parsed as ' . round($postMaxSize / 1024) . ' kb)'
80 80
                 );
81 81
             }
82 82
 
@@ -565,14 +565,14 @@  discard block
 block discarded – undo
565 565
                 $sourceSize = @filesize($source);
566 566
                 if ($sourceSize !== false) {
567 567
                     $msg .= ', reducing file size with ' .
568
-                        round((filesize($source) - filesize($destination))/filesize($source) * 100) . '% ';
568
+                        round((filesize($source) - filesize($destination)) / filesize($source) * 100) . '% ';
569 569
 
570 570
                     if ($sourceSize < 10000) {
571 571
                         $msg .= '(went from ' . round(filesize($source)) . ' bytes to ';
572 572
                         $msg .= round(filesize($destination)) . ' bytes)';
573 573
                     } else {
574
-                        $msg .= '(went from ' . round(filesize($source)/1024) . ' kb to ';
575
-                        $msg .= round(filesize($destination)/1024) . ' kb)';
574
+                        $msg .= '(went from ' . round(filesize($source) / 1024) . ' kb to ';
575
+                        $msg .= round(filesize($destination) / 1024) . ' kb)';
576 576
                     }
577 577
                 }
578 578
                 $this->logLn($msg);
@@ -708,11 +708,11 @@  discard block
 block discarded – undo
708 708
     // If other binaries are going to be added, notice that the first argument is what PHP_OS returns.
709 709
     // (possible values, see here: https://stackoverflow.com/questions/738823/possible-values-for-php-os)
710 710
     private static $suppliedBinariesInfo = [
711
-        'WINNT' => [ 'cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
712
-        'Darwin' => [ 'cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
713
-        'SunOS' => [ 'cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
714
-        'FreeBSD' => [ 'cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
715
-        'Linux' => [ 'cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
711
+        'WINNT' => ['cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
712
+        'Darwin' => ['cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
713
+        'SunOS' => ['cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
714
+        'FreeBSD' => ['cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
715
+        'Linux' => ['cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
716 716
     ];
717 717
 
718 718
     private static function executeBinary($binary, $commandOptions, $useNice, $logger)
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
 
747 747
         // Size
748 748
         if (!is_null($options['size-in-percentage'])) {
749
-            $sizeSource =  @filesize($this->source);
749
+            $sizeSource = @filesize($this->source);
750 750
             if ($sizeSource !== false) {
751 751
                 $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);
752 752
             }
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
                                                 'It ought to be here: ' . $binaryFile;
957 957
                                             break;
958 958
                                         default:
959
-                                            $errorMsg .= ' (exit code:' .  $returnCode . ').';
959
+                                            $errorMsg .= ' (exit code:' . $returnCode . ').';
960 960
                                     }
961 961
                                 }
962 962
                             }
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
 
1321 1321
                      //simpler than flood fill
1322 1322
                     imagefilledrectangle($dst, 0, 0, imagesx($image), imagesy($image), $transparent);
1323
-                    imagealphablending($dst, true);     //restore default blending
1323
+                    imagealphablending($dst, true); //restore default blending
1324 1324
 
1325 1325
                     imagecopy($dst, $image, 0, 0, 0, 0, imagesx($image), imagesy($image));
1326 1326
                     imagedestroy($image);
@@ -1957,21 +1957,21 @@  discard block
 block discarded – undo
1957 1957
 {
1958 1958
     public static $extraOptions = [
1959 1959
         [
1960
-            'name' => 'api-version',        /* Can currently be 0 or 1 */
1960
+            'name' => 'api-version', /* Can currently be 0 or 1 */
1961 1961
             'type' => 'number',
1962 1962
             'sensitive' => false,
1963 1963
             'default' => 0,
1964 1964
             'required' => false
1965 1965
         ],
1966 1966
         [
1967
-            'name' => 'secret',        /* only in api v.0 */
1967
+            'name' => 'secret', /* only in api v.0 */
1968 1968
             'type' => 'string',
1969 1969
             'sensitive' => true,
1970 1970
             'default' => 'my dog is white',
1971 1971
             'required' => false
1972 1972
         ],
1973 1973
         [
1974
-            'name' => 'api-key',        /* new in api v.1 (renamed 'secret' to 'api-key') */
1974
+            'name' => 'api-key', /* new in api v.1 (renamed 'secret' to 'api-key') */
1975 1975
             'type' => 'string',
1976 1976
             'sensitive' => true,
1977 1977
             'default' => 'my dog is white',
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
             'required' => true
1986 1986
         ],
1987 1987
         [
1988
-            'name' => 'crypt-api-key-in-transfer',  /* new in api v.1 */
1988
+            'name' => 'crypt-api-key-in-transfer', /* new in api v.1 */
1989 1989
             'type' => 'boolean',
1990 1990
             'sensitive' => false,
1991 1991
             'default' => false,
@@ -2020,7 +2020,7 @@  discard block
 block discarded – undo
2020 2020
             ['.', '/']
2021 2021
         );
2022 2022
 
2023
-        for ($i=0; $i<22; $i++) {
2023
+        for ($i = 0; $i < 22; $i++) {
2024 2024
             $salt .= $validCharsForSalt[array_rand($validCharsForSalt)];
2025 2025
         }
2026 2026
         return $salt;
@@ -2747,7 +2747,7 @@  discard block
 block discarded – undo
2747 2747
     public function serveOriginal()
2748 2748
     {
2749 2749
         if (!$this->callAboutToServeImageCallBack('source')) {
2750
-            return true;    // we shall not trigger the fail callback
2750
+            return true; // we shall not trigger the fail callback
2751 2751
         }
2752 2752
 
2753 2753
         if ($this->options['add-content-type-header']) {
@@ -2990,7 +2990,7 @@  discard block
 block discarded – undo
2990 2990
             case 'report':
2991 2991
                 $this->addXStatusHeader('Reporting...');
2992 2992
                 Report::convertAndReport($this->source, $this->destination, $this->options);
2993
-                return true;  // yeah, lets say that a report is always a success, even if conversion is a failure
2993
+                return true; // yeah, lets say that a report is always a success, even if conversion is a failure
2994 2994
         }
2995 2995
     }
2996 2996
 
@@ -3090,7 +3090,7 @@  discard block
 block discarded – undo
3090 3090
                 return 'image/' . $fileExtension;
3091 3091
 
3092 3092
             case 'ico':
3093
-                return 'image/vnd.microsoft.icon';      // or perhaps 'x-icon' ?
3093
+                return 'image/vnd.microsoft.icon'; // or perhaps 'x-icon' ?
3094 3094
 
3095 3095
             case 'jpg':
3096 3096
                 return 'image/jpeg';
@@ -3380,7 +3380,7 @@  discard block
 block discarded – undo
3380 3380
             }
3381 3381
         }
3382 3382
 
3383
-        return;     // undetermined
3383
+        return; // undetermined
3384 3384
     }
3385 3385
 }
3386 3386
 
Please login to merge, or discard this patch.
build/webp-on-demand-1.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     public function addLastModifiedHeader($timestamp)
91 91
     {
92 92
         if ($this->options['add-last-modified-header']) {
93
-            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) ." GMT", true);
93
+            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) . " GMT", true);
94 94
         }
95 95
     }
96 96
 
Please login to merge, or discard this patch.
build/webp-convert.inc 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
         }
928 928
 
929 929
         if (!$success && $options['try-supplied-binary-for-os']) {
930
-          // Try supplied binary (if available for OS, and hash is correct)
930
+            // Try supplied binary (if available for OS, and hash is correct)
931 931
             if (isset(self::$suppliedBinariesInfo[PHP_OS])) {
932 932
                 $info = self::$suppliedBinariesInfo[PHP_OS];
933 933
 
@@ -1344,10 +1344,10 @@  discard block
 block discarded – undo
1344 1344
                     //prevent blending with default black
1345 1345
                     imagealphablending($dst, false);
1346 1346
 
1347
-                     //change the RGB values if you need, but leave alpha at 127
1347
+                        //change the RGB values if you need, but leave alpha at 127
1348 1348
                     $transparent = imagecolorallocatealpha($dst, 255, 255, 255, 127);
1349 1349
 
1350
-                     //simpler than flood fill
1350
+                        //simpler than flood fill
1351 1351
                     imagefilledrectangle($dst, 0, 0, imagesx($image), imagesy($image), $transparent);
1352 1352
                     imagealphablending($dst, true);     //restore default blending
1353 1353
 
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
             if (($uploadMaxSize !== false) && ($uploadMaxSize < $fileSize)) {
94 94
                 throw new ConversionFailedException(
95 95
                     'File is larger than your max upload (set in your php.ini). File size:' .
96
-                        round($fileSize/1024) . ' kb. ' .
96
+                        round($fileSize / 1024) . ' kb. ' .
97 97
                         'upload_max_filesize in php.ini: ' . ini_get('upload_max_filesize') .
98
-                        ' (parsed as ' . round($uploadMaxSize/1024) . ' kb)'
98
+                        ' (parsed as ' . round($uploadMaxSize / 1024) . ' kb)'
99 99
                 );
100 100
             }
101 101
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
             if (($postMaxSize !== false) && ($postMaxSize < $fileSize)) {
104 104
                 throw new ConversionFailedException(
105 105
                     'File is larger than your post_max_size limit (set in your php.ini). File size:' .
106
-                        round($fileSize/1024) . ' kb. ' .
106
+                        round($fileSize / 1024) . ' kb. ' .
107 107
                         'post_max_size in php.ini: ' . ini_get('post_max_size') .
108
-                        ' (parsed as ' . round($postMaxSize/1024) . ' kb)'
108
+                        ' (parsed as ' . round($postMaxSize / 1024) . ' kb)'
109 109
                 );
110 110
             }
111 111
 
@@ -594,14 +594,14 @@  discard block
 block discarded – undo
594 594
                 $sourceSize = @filesize($source);
595 595
                 if ($sourceSize !== false) {
596 596
                     $msg .= ', reducing file size with ' .
597
-                        round((filesize($source) - filesize($destination))/filesize($source) * 100) . '% ';
597
+                        round((filesize($source) - filesize($destination)) / filesize($source) * 100) . '% ';
598 598
 
599 599
                     if ($sourceSize < 10000) {
600 600
                         $msg .= '(went from ' . round(filesize($source)) . ' bytes to ';
601 601
                         $msg .= round(filesize($destination)) . ' bytes)';
602 602
                     } else {
603
-                        $msg .= '(went from ' . round(filesize($source)/1024) . ' kb to ';
604
-                        $msg .= round(filesize($destination)/1024) . ' kb)';
603
+                        $msg .= '(went from ' . round(filesize($source) / 1024) . ' kb to ';
604
+                        $msg .= round(filesize($destination) / 1024) . ' kb)';
605 605
                     }
606 606
                 }
607 607
                 $this->logLn($msg);
@@ -737,11 +737,11 @@  discard block
 block discarded – undo
737 737
     // If other binaries are going to be added, notice that the first argument is what PHP_OS returns.
738 738
     // (possible values, see here: https://stackoverflow.com/questions/738823/possible-values-for-php-os)
739 739
     private static $suppliedBinariesInfo = [
740
-        'WINNT' => [ 'cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
741
-        'Darwin' => [ 'cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
742
-        'SunOS' => [ 'cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
743
-        'FreeBSD' => [ 'cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
744
-        'Linux' => [ 'cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
740
+        'WINNT' => ['cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
741
+        'Darwin' => ['cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
742
+        'SunOS' => ['cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
743
+        'FreeBSD' => ['cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
744
+        'Linux' => ['cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
745 745
     ];
746 746
 
747 747
     private static function executeBinary($binary, $commandOptions, $useNice, $logger)
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 
776 776
         // Size
777 777
         if (!is_null($options['size-in-percentage'])) {
778
-            $sizeSource =  @filesize($this->source);
778
+            $sizeSource = @filesize($this->source);
779 779
             if ($sizeSource !== false) {
780 780
                 $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);
781 781
             }
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
                                                 'It ought to be here: ' . $binaryFile;
986 986
                                             break;
987 987
                                         default:
988
-                                            $errorMsg .= ' (exit code:' .  $returnCode . ').';
988
+                                            $errorMsg .= ' (exit code:' . $returnCode . ').';
989 989
                                     }
990 990
                                 }
991 991
                             }
@@ -1349,7 +1349,7 @@  discard block
 block discarded – undo
1349 1349
 
1350 1350
                      //simpler than flood fill
1351 1351
                     imagefilledrectangle($dst, 0, 0, imagesx($image), imagesy($image), $transparent);
1352
-                    imagealphablending($dst, true);     //restore default blending
1352
+                    imagealphablending($dst, true); //restore default blending
1353 1353
 
1354 1354
                     imagecopy($dst, $image, 0, 0, 0, 0, imagesx($image), imagesy($image));
1355 1355
                     imagedestroy($image);
@@ -1986,21 +1986,21 @@  discard block
 block discarded – undo
1986 1986
 {
1987 1987
     public static $extraOptions = [
1988 1988
         [
1989
-            'name' => 'api-version',        /* Can currently be 0 or 1 */
1989
+            'name' => 'api-version', /* Can currently be 0 or 1 */
1990 1990
             'type' => 'number',
1991 1991
             'sensitive' => false,
1992 1992
             'default' => 0,
1993 1993
             'required' => false
1994 1994
         ],
1995 1995
         [
1996
-            'name' => 'secret',        /* only in api v.0 */
1996
+            'name' => 'secret', /* only in api v.0 */
1997 1997
             'type' => 'string',
1998 1998
             'sensitive' => true,
1999 1999
             'default' => 'my dog is white',
2000 2000
             'required' => false
2001 2001
         ],
2002 2002
         [
2003
-            'name' => 'api-key',        /* new in api v.1 (renamed 'secret' to 'api-key') */
2003
+            'name' => 'api-key', /* new in api v.1 (renamed 'secret' to 'api-key') */
2004 2004
             'type' => 'string',
2005 2005
             'sensitive' => true,
2006 2006
             'default' => 'my dog is white',
@@ -2014,7 +2014,7 @@  discard block
 block discarded – undo
2014 2014
             'required' => true
2015 2015
         ],
2016 2016
         [
2017
-            'name' => 'crypt-api-key-in-transfer',  /* new in api v.1 */
2017
+            'name' => 'crypt-api-key-in-transfer', /* new in api v.1 */
2018 2018
             'type' => 'boolean',
2019 2019
             'sensitive' => false,
2020 2020
             'default' => false,
@@ -2049,7 +2049,7 @@  discard block
 block discarded – undo
2049 2049
             ['.', '/']
2050 2050
         );
2051 2051
 
2052
-        for ($i=0; $i<22; $i++) {
2052
+        for ($i = 0; $i < 22; $i++) {
2053 2053
             $salt .= $validCharsForSalt[array_rand($validCharsForSalt)];
2054 2054
         }
2055 2055
         return $salt;
@@ -2822,7 +2822,7 @@  discard block
 block discarded – undo
2822 2822
     public function addLastModifiedHeader($timestamp)
2823 2823
     {
2824 2824
         if ($this->options['add-last-modified-header']) {
2825
-            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) ." GMT", true);
2825
+            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) . " GMT", true);
2826 2826
         }
2827 2827
     }
2828 2828
 
@@ -3001,7 +3001,7 @@  discard block
 block discarded – undo
3001 3001
     public function serveOriginal()
3002 3002
     {
3003 3003
         if (!$this->callAboutToServeImageCallBack('source')) {
3004
-            return true;    // we shall not trigger the fail callback
3004
+            return true; // we shall not trigger the fail callback
3005 3005
         }
3006 3006
 
3007 3007
         if ($this->options['add-content-type-header']) {
@@ -3244,7 +3244,7 @@  discard block
 block discarded – undo
3244 3244
             case 'report':
3245 3245
                 $this->addXStatusHeader('Reporting...');
3246 3246
                 Report::convertAndReport($this->source, $this->destination, $this->options);
3247
-                return true;  // yeah, lets say that a report is always a success, even if conversion is a failure
3247
+                return true; // yeah, lets say that a report is always a success, even if conversion is a failure
3248 3248
         }
3249 3249
     }
3250 3250
 
@@ -3385,7 +3385,7 @@  discard block
 block discarded – undo
3385 3385
                 return 'image/' . $fileExtension;
3386 3386
 
3387 3387
             case 'ico':
3388
-                return 'image/vnd.microsoft.icon';      // or perhaps 'x-icon' ?
3388
+                return 'image/vnd.microsoft.icon'; // or perhaps 'x-icon' ?
3389 3389
 
3390 3390
             case 'jpg':
3391 3391
                 return 'image/jpeg';
@@ -3675,7 +3675,7 @@  discard block
 block discarded – undo
3675 3675
             }
3676 3676
         }
3677 3677
 
3678
-        return;     // undetermined
3678
+        return; // undetermined
3679 3679
     }
3680 3680
 }
3681 3681
 
Please login to merge, or discard this patch.
src/Serve/ServeBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     public function addLastModifiedHeader($timestamp)
90 90
     {
91 91
         if ($this->options['add-last-modified-header']) {
92
-            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) ." GMT", true);
92
+            $this->header("Last-Modified: " . gmdate("D, d M Y H:i:s", $timestamp) . " GMT", true);
93 93
         }
94 94
     }
95 95
 
Please login to merge, or discard this patch.
src/Serve/ServeConverted.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     public function serveOriginal()
44 44
     {
45 45
         if (!$this->callAboutToServeImageCallBack('source')) {
46
-            return true;    // we shall not trigger the fail callback
46
+            return true; // we shall not trigger the fail callback
47 47
         }
48 48
 
49 49
         if ($this->options['add-content-type-header']) {
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             case 'report':
287 287
                 $this->addXStatusHeader('Reporting...');
288 288
                 Report::convertAndReport($this->source, $this->destination, $this->options);
289
-                return true;  // yeah, lets say that a report is always a success, even if conversion is a failure
289
+                return true; // yeah, lets say that a report is always a success, even if conversion is a failure
290 290
         }
291 291
     }
292 292
 
Please login to merge, or discard this patch.
src/Convert/Converters/Cwebp.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
         }
257 257
 
258 258
         if (!$success && $options['try-supplied-binary-for-os']) {
259
-          // Try supplied binary (if available for OS, and hash is correct)
259
+            // Try supplied binary (if available for OS, and hash is correct)
260 260
             if (isset(self::$suppliedBinariesInfo[PHP_OS])) {
261 261
                 $info = self::$suppliedBinariesInfo[PHP_OS];
262 262
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     // If other binaries are going to be added, notice that the first argument is what PHP_OS returns.
67 67
     // (possible values, see here: https://stackoverflow.com/questions/738823/possible-values-for-php-os)
68 68
     private static $suppliedBinariesInfo = [
69
-        'WINNT' => [ 'cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
70
-        'Darwin' => [ 'cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
71
-        'SunOS' => [ 'cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
72
-        'FreeBSD' => [ 'cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
73
-        'Linux' => [ 'cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
69
+        'WINNT' => ['cwebp.exe', '49e9cb98db30bfa27936933e6fd94d407e0386802cb192800d9fd824f6476873'],
70
+        'Darwin' => ['cwebp-mac12', 'a06a3ee436e375c89dbc1b0b2e8bd7729a55139ae072ed3f7bd2e07de0ebb379'],
71
+        'SunOS' => ['cwebp-sol', '1febaffbb18e52dc2c524cda9eefd00c6db95bc388732868999c0f48deb73b4f'],
72
+        'FreeBSD' => ['cwebp-fbsd', 'e5cbea11c97fadffe221fdf57c093c19af2737e4bbd2cb3cd5e908de64286573'],
73
+        'Linux' => ['cwebp-linux', '916623e5e9183237c851374d969aebdb96e0edc0692ab7937b95ea67dc3b2568']
74 74
     ];
75 75
 
76 76
     private static function executeBinary($binary, $commandOptions, $useNice, $logger)
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         // Size
106 106
         if (!is_null($options['size-in-percentage'])) {
107
-            $sizeSource =  @filesize($this->source);
107
+            $sizeSource = @filesize($this->source);
108 108
             if ($sizeSource !== false) {
109 109
                 $targetSize = floor($sizeSource * $options['size-in-percentage'] / 100);
110 110
             }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                                                 'It ought to be here: ' . $binaryFile;
315 315
                                             break;
316 316
                                         default:
317
-                                            $errorMsg .= ' (exit code:' .  $returnCode . ').';
317
+                                            $errorMsg .= ' (exit code:' . $returnCode . ').';
318 318
                                     }
319 319
                                 }
320 320
                             }
Please login to merge, or discard this patch.