@@ -54,12 +54,12 @@ |
||
54 | 54 | $sourceFile = $input->getArgument('source-file-path'); |
55 | 55 | $targetFile = $input->getArgument('target-file-path'); |
56 | 56 | |
57 | - if (! file_exists($configPath)) { |
|
57 | + if (!file_exists($configPath)) { |
|
58 | 58 | throw new InvalidConfigException(sprintf('Config file "%s" does not exists.', $configPath)); |
59 | 59 | } |
60 | 60 | |
61 | 61 | $extension = pathinfo($configPath, PATHINFO_EXTENSION); |
62 | - if (! Validator::key($extension)->validate(static::CONSOLE_CONFIG_FACTORIES)) { |
|
62 | + if (!Validator::key($extension)->validate(static::CONSOLE_CONFIG_FACTORIES)) { |
|
63 | 63 | throw new InvalidConfigException( |
64 | 64 | sprintf('Config file "%s" must have .yml, .json or .php extension.', $configPath) |
65 | 65 | ); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $this->output->section(sprintf('Directory "%s" parsing begins.', $sourcePath)); |
70 | 70 | |
71 | 71 | // Check if source directory exists |
72 | - if (! $this->fileSystem->has($sourcePath) || ! $this->fileSystem->getMimetype($sourcePath) === 'directory') { |
|
72 | + if (!$this->fileSystem->has($sourcePath) || !$this->fileSystem->getMimetype($sourcePath) === 'directory') { |
|
73 | 73 | throw new ExecutorException(sprintf('The source directory "%s" does not exist.', $sourcePath)); |
74 | 74 | } |
75 | 75 |
@@ -76,13 +76,13 @@ |
||
76 | 76 | */ |
77 | 77 | public function execute(string $sourcePath, string $targetPath): void |
78 | 78 | { |
79 | - if (! $this->fileValidator->validate($sourcePath)) { |
|
79 | + if (!$this->fileValidator->validate($sourcePath)) { |
|
80 | 80 | return; |
81 | 81 | } |
82 | 82 | |
83 | 83 | $targetPathExists = $this->fileSystem->has($targetPath); |
84 | 84 | |
85 | - if ($targetPathExists && ! $this->config->hasOverwrite()) { |
|
85 | + if ($targetPathExists && !$this->config->hasOverwrite()) { |
|
86 | 86 | throw new ExecutorException(sprintf('The target file "%s" already exists.', $targetPath)); |
87 | 87 | } |
88 | 88 |
@@ -22,5 +22,5 @@ |
||
22 | 22 | * |
23 | 23 | * @throws Exception If the configuration does not allow ignoring errors. |
24 | 24 | */ |
25 | - public function catch(Exception $exception): void; |
|
25 | + public function catch (Exception $exception): void; |
|
26 | 26 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | /** |
45 | 45 | * {@inheritdoc} |
46 | 46 | */ |
47 | - public function catch(Exception $exception): void |
|
47 | + public function catch (Exception $exception): void |
|
48 | 48 | { |
49 | 49 | if ($this->config->hasIgnore()) { |
50 | 50 | $this->output->note($exception->getMessage()); |
@@ -47,7 +47,7 @@ |
||
47 | 47 | */ |
48 | 48 | public function validate(string $path): bool |
49 | 49 | { |
50 | - if (! $this->fileSystem->has($path) |
|
50 | + if (!$this->fileSystem->has($path) |
|
51 | 51 | || $this->fileSystem->get($path)->getType() !== 'file') { |
52 | 52 | return false; |
53 | 53 | } |