@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public static function getBinaries(Event $event) |
| 31 | 31 | { |
| 32 | - $dir = self::getRootPath().'/bin'; |
|
| 32 | + $dir = self::getRootPath() . '/bin'; |
|
| 33 | 33 | |
| 34 | 34 | if (!file_exists($dir)) { |
| 35 | 35 | mkdir($dir); |
@@ -40,10 +40,10 @@ discard block |
||
| 40 | 40 | foreach (self::$extByPlatforms as $ext) { |
| 41 | 41 | foreach (self::$tools as $tool) { |
| 42 | 42 | file_put_contents( |
| 43 | - $dir.'/'.$tool, |
|
| 44 | - fopen('https://github.com/nosilver4u/ewww-image-optimizer/raw/master/binaries/'.$tool.$ext, 'r') |
|
| 43 | + $dir . '/' . $tool, |
|
| 44 | + fopen('https://github.com/nosilver4u/ewww-image-optimizer/raw/master/binaries/' . $tool . $ext, 'r') |
|
| 45 | 45 | ); |
| 46 | - $event->getIO()->write($tool.$ext); |
|
| 46 | + $event->getIO()->write($tool . $ext); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | public function canHandleFile($file = null) |
| 17 | 17 | { |
| 18 | 18 | if (!$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 |
||
| 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 | } |
@@ -15,7 +15,7 @@ |
||
| 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 | } |
@@ -15,14 +15,14 @@ |
||
| 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 | * Обрабатывает файлы в очереди. |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public function handleQueue() |
| 18 | 18 | { |
| 19 | 19 | foreach ($this->files as $file) { |
| 20 | - echo get_class()." обрабатывает файл: $file\n"; |
|
| 20 | + echo get_class() . " обрабатывает файл: $file\n"; |
|
| 21 | 21 | } |
| 22 | 22 | // TODO: Implement handleQueue() method. |
| 23 | 23 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | /** @var array Стандартные обработчики */ |
| 8 | 8 | private $defaultHandlers = [ |
| 9 | - 'image' => __NAMESPACE__.'\ImageHandler', |
|
| 9 | + 'image' => __NAMESPACE__ . '\ImageHandler', |
|
| 10 | 10 | //'css' => __NAMESPACE__ . '\CssHandler', |
| 11 | 11 | ]; |
| 12 | 12 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | $basePath = $_SERVER['DOCUMENT_ROOT']; |
| 31 | 31 | |
| 32 | 32 | return new \RecursiveIteratorIterator( |
| 33 | - new \RecursiveDirectoryIterator($basePath.'/'.$path) |
|
| 33 | + new \RecursiveDirectoryIterator($basePath . '/' . $path) |
|
| 34 | 34 | ); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -42,7 +42,7 @@ |
||
| 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 | } |