Completed
Push — master ( ea15bf...aaaaf9 )
by Andrew
02:34
created
src/Knp/Snappy/AbstractGenerator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -334,9 +334,9 @@  discard block
 block discarded – undo
334 334
     {
335 335
         if (0 !== $status and '' !== $stderr) {
336 336
             throw new \RuntimeException(sprintf(
337
-                'The exit status code \'%s\' says something went wrong:'."\n"
338
-                .'stderr: "%s"'."\n"
339
-                .'stdout: "%s"'."\n"
337
+                'The exit status code \'%s\' says something went wrong:' . "\n"
338
+                .'stderr: "%s"' . "\n"
339
+                .'stdout: "%s"' . "\n"
340 340
                 .'command: %s.',
341 341
                 $status, $stderr, $stdout, $command
342 342
             ));
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
         $filename = $dir . DIRECTORY_SEPARATOR . uniqid('knp_snappy', true);
368 368
 
369 369
         if (null !== $extension) {
370
-            $filename .= '.'.$extension;
370
+            $filename .= '.' . $extension;
371 371
         }
372 372
 
373 373
         if (null !== $content) {
@@ -413,28 +413,28 @@  discard block
 block discarded – undo
413 413
                 if (true === $option) {
414 414
                     // Dont't put '--' if option is 'toc'.
415 415
                     if ($key == 'toc') {
416
-                        $command .= ' '.$key;
416
+                        $command .= ' ' . $key;
417 417
                     } else {
418
-                        $command .= ' --'.$key;
418
+                        $command .= ' --' . $key;
419 419
                     }
420 420
 
421 421
                 } elseif (is_array($option)) {
422 422
                     if ($this->isAssociativeArray($option)) {
423 423
                         foreach ($option as $k => $v) {
424
-                            $command .= ' --'.$key.' '.escapeshellarg($k).' '.escapeshellarg($v);
424
+                            $command .= ' --' . $key . ' ' . escapeshellarg($k) . ' ' . escapeshellarg($v);
425 425
                         }
426 426
                     } else {
427 427
                         foreach ($option as $v) {
428
-                            $command .= ' --'.$key.' '.escapeshellarg($v);
428
+                            $command .= ' --' . $key . ' ' . escapeshellarg($v);
429 429
                         }
430 430
                     }
431 431
 
432 432
                 } else {
433 433
                     // Dont't add '--' if option is "cover"  or "toc".
434 434
                     if (in_array($key, array('toc', 'cover'))) {
435
-                        $command .= ' '.$key.' '.escapeshellarg($option);
435
+                        $command .= ' ' . $key . ' ' . escapeshellarg($option);
436 436
                     } else {
437
-                        $command .= ' --'.$key.' '.escapeshellarg($option);
437
+                        $command .= ' --' . $key . ' ' . escapeshellarg($option);
438 438
                     }
439 439
                 }
440 440
             }
@@ -442,11 +442,11 @@  discard block
 block discarded – undo
442 442
 
443 443
         if (is_array($input)) {
444 444
             foreach ($input as $i) {
445
-                $command .= ' '.escapeshellarg($i).' ';
445
+                $command .= ' ' . escapeshellarg($i) . ' ';
446 446
             }
447 447
             $command .= escapeshellarg($output);
448 448
         } else {
449
-            $command .= ' '.escapeshellarg($input).' '.escapeshellarg($output);
449
+            $command .= ' ' . escapeshellarg($input) . ' ' . escapeshellarg($output);
450 450
         }
451 451
 
452 452
         return $command;
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      */
463 463
     protected function isAssociativeArray(array $array)
464 464
     {
465
-        return (bool) count(array_filter(array_keys($array), 'is_string'));
465
+        return (bool)count(array_filter(array_keys($array), 'is_string'));
466 466
     }
467 467
 
468 468
     /**
Please login to merge, or discard this patch.
src/Knp/Snappy/Image.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -28,54 +28,54 @@
 block discarded – undo
28 28
     protected function configure()
29 29
     {
30 30
         $this->addOptions(array(
31
-            'allow'                        => null,    // Allow the file or files from the specified folder to be loaded (repeatable)
32
-            'checkbox-checked-svg'         => null,    // Use this SVG file when rendering checked checkboxes
33
-            'checked-svg'                  => null,    // Use this SVG file when rendering unchecked checkboxes
31
+            'allow'                        => null, // Allow the file or files from the specified folder to be loaded (repeatable)
32
+            'checkbox-checked-svg'         => null, // Use this SVG file when rendering checked checkboxes
33
+            'checked-svg'                  => null, // Use this SVG file when rendering unchecked checkboxes
34 34
             'cookie'                       => array(), // Set an additional cookie (repeatable)
35
-            'cookie-jar'                   => null,    // Read and write cookies from and to the supplied cookie jar file
36
-            'crop-h'                       => null,    // Set height for croping
37
-            'crop-w'                       => null,    // Set width for croping
38
-            'crop-x'                       => null,    // Set x coordinate for croping (default 0)
39
-            'crop-y'                       => null,    // Set y coordinate for croping (default 0)
35
+            'cookie-jar'                   => null, // Read and write cookies from and to the supplied cookie jar file
36
+            'crop-h'                       => null, // Set height for croping
37
+            'crop-w'                       => null, // Set width for croping
38
+            'crop-x'                       => null, // Set x coordinate for croping (default 0)
39
+            'crop-y'                       => null, // Set y coordinate for croping (default 0)
40 40
             'custom-header'                => array(), // Set an additional HTTP header (repeatable)
41
-            'custom-header-propagation'    => null,    // Add HTTP headers specified by --custom-header for each resource request.
42
-            'no-custom-header-propagation' => null,    // Do not add HTTP headers specified by --custom-header for each resource request.
43
-            'debug-javascript'             => null,    // Show javascript debugging output
44
-            'no-debug-javascript'          => null,    // Do not show javascript debugging output (default)
45
-            'encoding'                     => null,    // Set the default text encoding, for input
46
-            'format'                       => $this->getDefaultExtension(),   // Output format
47
-            'height'                       => null,    // Set screen height (default is calculated from page content) (default 0)
48
-            'images'                       => null,    // Do load or print images (default)
49
-            'no-images'                    => null,    // Do not load or print images
50
-            'disable-javascript'           => null,    // Do not allow web pages to run javascript
51
-            'enable-javascript'            => null,    // Do allow web pages to run javascript (default)
52
-            'javascript-delay'             => null,    // Wait some milliseconds for javascript finish (default 200)
53
-            'load-error-handling'          => null,    // Specify how to handle pages that fail to load: abort, ignore or skip (default abort)
54
-            'load-media-error-handling'    => null,    // Specify how to handle media files that fail to load: abort, ignore or skip (default ignore)
55
-            'disable-local-file-access'    => null,    // Do not allowed conversion of a local file to read in other local files, unless explecitily allowed with allow
56
-            'enable-local-file-access'     => null,    // Allowed conversion of a local file to read in other local files. (default)
57
-            'minimum-font-size'            => null,    // Minimum font size
58
-            'password'                     => null,    // HTTP Authentication password
59
-            'disable-plugins'              => null,    // Disable installed plugins (default)
60
-            'enable-plugins'               => null,    // Enable installed plugins (plugins will likely not work)
41
+            'custom-header-propagation'    => null, // Add HTTP headers specified by --custom-header for each resource request.
42
+            'no-custom-header-propagation' => null, // Do not add HTTP headers specified by --custom-header for each resource request.
43
+            'debug-javascript'             => null, // Show javascript debugging output
44
+            'no-debug-javascript'          => null, // Do not show javascript debugging output (default)
45
+            'encoding'                     => null, // Set the default text encoding, for input
46
+            'format'                       => $this->getDefaultExtension(), // Output format
47
+            'height'                       => null, // Set screen height (default is calculated from page content) (default 0)
48
+            'images'                       => null, // Do load or print images (default)
49
+            'no-images'                    => null, // Do not load or print images
50
+            'disable-javascript'           => null, // Do not allow web pages to run javascript
51
+            'enable-javascript'            => null, // Do allow web pages to run javascript (default)
52
+            'javascript-delay'             => null, // Wait some milliseconds for javascript finish (default 200)
53
+            'load-error-handling'          => null, // Specify how to handle pages that fail to load: abort, ignore or skip (default abort)
54
+            'load-media-error-handling'    => null, // Specify how to handle media files that fail to load: abort, ignore or skip (default ignore)
55
+            'disable-local-file-access'    => null, // Do not allowed conversion of a local file to read in other local files, unless explecitily allowed with allow
56
+            'enable-local-file-access'     => null, // Allowed conversion of a local file to read in other local files. (default)
57
+            'minimum-font-size'            => null, // Minimum font size
58
+            'password'                     => null, // HTTP Authentication password
59
+            'disable-plugins'              => null, // Disable installed plugins (default)
60
+            'enable-plugins'               => null, // Enable installed plugins (plugins will likely not work)
61 61
             'post'                         => array(), // Add an additional post field
62 62
             'post-file'                    => array(), // Post an additional file
63
-            'proxy'                        => null,    // Use a proxy
64
-            'quality'                      => null,    // Output image quality (between 0 and 100) (default 94)
65
-            'radiobutton-checked-svg'      => null,    // Use this SVG file when rendering checked radiobuttons
66
-            'radiobutton-svg'              => null,    // Use this SVG file when rendering unchecked radiobuttons
67
-            'run-script'                   => null,    // Run this additional javascript after the page is done loading (repeatable)
68
-            'disable-smart-width'          => null,    // Use the specified width even if it is not large enough for the content
69
-            'enable-smart-width'           => null,    // Extend --width to fit unbreakable content (default)
70
-            'stop-slow-scripts'            => null,    // Stop slow running javascripts
71
-            'no-stop-slow-scripts'         => null,    // Do not stop slow running javascripts (default)
72
-            'transparent'                  => null,    // Make the background transparrent in pngs *
73
-            'use-xserver'                  => null,    // Use the X server (some plugins and other stuff might not work without X11)
74
-            'user-style-sheet'             => null,    // Specify a user style sheet, to load with every page
75
-            'username'                     => null,    // HTTP Authentication username
76
-            'width'                        => null,    // Set screen width (default is 1024)
77
-            'window-status'                => null,    // Wait until window.status is equal to this string before rendering page
78
-            'zoom'                         => null,    // Use this zoom factor (default 1)
63
+            'proxy'                        => null, // Use a proxy
64
+            'quality'                      => null, // Output image quality (between 0 and 100) (default 94)
65
+            'radiobutton-checked-svg'      => null, // Use this SVG file when rendering checked radiobuttons
66
+            'radiobutton-svg'              => null, // Use this SVG file when rendering unchecked radiobuttons
67
+            'run-script'                   => null, // Run this additional javascript after the page is done loading (repeatable)
68
+            'disable-smart-width'          => null, // Use the specified width even if it is not large enough for the content
69
+            'enable-smart-width'           => null, // Extend --width to fit unbreakable content (default)
70
+            'stop-slow-scripts'            => null, // Stop slow running javascripts
71
+            'no-stop-slow-scripts'         => null, // Do not stop slow running javascripts (default)
72
+            'transparent'                  => null, // Make the background transparrent in pngs *
73
+            'use-xserver'                  => null, // Use the X server (some plugins and other stuff might not work without X11)
74
+            'user-style-sheet'             => null, // Specify a user style sheet, to load with every page
75
+            'username'                     => null, // HTTP Authentication username
76
+            'width'                        => null, // Set screen width (default is 1024)
77
+            'window-status'                => null, // Wait until window.status is equal to this string before rendering page
78
+            'zoom'                         => null, // Use this zoom factor (default 1)
79 79
         ));
80 80
     }
81 81
 }
Please login to merge, or discard this patch.