Completed
Push — master ( 2da831...e940cd )
by Dmitry
02:02
created
lib/Handler/CssHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function handleQueue()
16 16
     {
17 17
         foreach ($this->files as $file) {
18
-            echo get_class()." обрабатывает файл: $file\n";
18
+            echo get_class() . " обрабатывает файл: $file\n";
19 19
         }
20 20
         // TODO: Implement handleQueue() method.
21 21
     }
Please login to merge, or discard this patch.
lib/Handler/HandlerInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
      */
16 16
     public function canHandleFile($file);
17 17
 
18
-     /**
19
-      * Записывает файл в очередь на обработку.
20
-      *
21
-      * @param string $file Путь к файлу
22
-      *
23
-      * @return void
24
-      */
25
-     public function queueFile($file);
18
+        /**
19
+         * Записывает файл в очередь на обработку.
20
+         *
21
+         * @param string $file Путь к файлу
22
+         *
23
+         * @return void
24
+         */
25
+        public function queueFile($file);
26 26
 
27 27
     /**
28 28
      * Обрабатывает файлы в очереди.
Please login to merge, or discard this patch.
lib/cli/SymfonyOptimize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
             $output->writeln('<info>BxOptimization set up.</info>');
44 44
         } catch (\Exception $e) {
45
-            $output->writeln('<error>'.get_class($e).': '.$e->getMessage().'</error>');
45
+            $output->writeln('<error>' . get_class($e) . ': ' . $e->getMessage() . '</error>');
46 46
         }
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
lib/Handler/Handler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     public function canHandleFile($file = null)
17 17
     {
18 18
         if (is_null($file)) {
19
-            throw new \Exception('В обработчик '.get_class()." передано неверное имя файла: $file");
19
+            throw new \Exception('В обработчик ' . get_class() . " передано неверное имя файла: $file");
20 20
         }
21 21
 
22 22
         $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function handleQueue()
39 39
     {
40 40
         foreach ($this->files as $file) {
41
-            echo get_class()." обрабатывает файл: $file\n";
41
+            echo get_class() . " обрабатывает файл: $file\n";
42 42
         }
43 43
         // TODO: Implement handleQueue() method.
44 44
     }
Please login to merge, or discard this patch.
lib/Handler/HandlerProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 {
7 7
     /** @var array Стандартные обработчики */
8 8
     private $defaultHandlers = [
9
-        'image' => __NAMESPACE__.'\ImageHandler',
10
-        'css'   => __NAMESPACE__.'\CssHandler',
9
+        'image' => __NAMESPACE__ . '\ImageHandler',
10
+        'css'   => __NAMESPACE__ . '\CssHandler',
11 11
     ];
12 12
 
13 13
     /** @var array Включенные обработчики */
Please login to merge, or discard this patch.
lib/Handler/HandlerTools.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         ],
49 49
     ];
50 50
 
51
-    public static function getBinaryHandler($type){
51
+    public static function getBinaryHandler($type) {
52 52
 
53 53
         $handlers = self::getBinaryHandlers();
54 54
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     }
60 60
 
61
-    public static function getBinaryHandlers(){
61
+    public static function getBinaryHandlers() {
62 62
 
63 63
         $os = strtolower(PHP_OS);
64 64
         if (substr($os, 0, 3) == "win") {
Please login to merge, or discard this patch.
lib/Finder/FilesFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function __construct($path)
16 16
     {
17 17
         $basePath = $_SERVER['DOCUMENT_ROOT'];
18
-        $path = $basePath .'/'. trim($path, '\/');
18
+        $path = $basePath . '/' . trim($path, '\/');
19 19
         if (empty($path) || !(is_dir($path) || is_file($path)) || !is_writable($path)) {
20 20
             throw new Exception('Путь не может быть пустым или нет доступа');
21 21
         }
Please login to merge, or discard this patch.
lib/Install/Installer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public static function getBinaries(Event $event)
27 27
     {
28
-        $dir = self::getRootPath().'/bin';
28
+        $dir = self::getRootPath() . '/bin';
29 29
 
30 30
         if (!file_exists($dir)) {
31 31
             mkdir($dir);
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
         foreach (self::$extByPlatforms as $ext) {
37 37
             foreach (self::$tools as $tool) {
38 38
                 file_put_contents(
39
-                    $dir.'/'.$tool.$ext,
40
-                    fopen('https://github.com/nosilver4u/ewww-image-optimizer/raw/master/binaries/'.$tool.$ext, 'r')
39
+                    $dir . '/' . $tool . $ext,
40
+                    fopen('https://github.com/nosilver4u/ewww-image-optimizer/raw/master/binaries/' . $tool . $ext, 'r')
41 41
                 );
42
-                $event->getIO()->write($tool.$ext);
42
+                $event->getIO()->write($tool . $ext);
43 43
             }
44 44
         }
45 45
 
Please login to merge, or discard this patch.
lib/Handler/ImageHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
             $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
34 34
 
35
-            if($handlers[$ext]) {
35
+            if ($handlers[$ext]) {
36 36
 
37
-                echo get_class()." обрабатывает файл: $file\n";
37
+                echo get_class() . " обрабатывает файл: $file\n";
38 38
 
39 39
 
40 40
                 switch ($ext) {
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
                         break;
44 44
                     case 'jpg':
45 45
                     case 'jpeg':
46
-                        $command =  sprintf($this->args[$ext], escapeshellarg($file), escapeshellarg($file . ".original"));
46
+                        $command = sprintf($this->args[$ext], escapeshellarg($file), escapeshellarg($file . ".original"));
47 47
                         break;
48 48
                 }
49 49
                 if (!file_exists($file . ".original") && $command) {
50 50
                     copy($file, $file . ".original");
51
-                    exec($handlers[$ext]  . $command);
51
+                    exec($handlers[$ext] . $command);
52 52
                 }
53 53
 
54 54
             } else {
Please login to merge, or discard this patch.