@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | protected function execute(InputInterface $input, OutputInterface $output) |
28 | 28 | { |
29 | 29 | $output->writeln("Boot validate analysis...."); |
30 | - $config = Config::loadFromFile(new FileSystemPath(\getcwd().'/namespace-protector-config.json')); |
|
30 | + $config = Config::loadFromFile(new FileSystemPath(\getcwd() . '/namespace-protector-config.json')); |
|
31 | 31 | $factory = new NamespaceProtectorProcessorFactory(); |
32 | 32 | $namespaceProtectorProcessor = $factory->create($config); |
33 | 33 | |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | $output->writeln('Start analysis...'); |
43 | 43 | $namespaceProtectorProcessor->process(); |
44 | 44 | |
45 | - $output->writeln('<fg=red>Total errors: ' . $namespaceProtectorProcessor->getCountErrors().'</>'); |
|
45 | + $output->writeln('<fg=red>Total errors: ' . $namespaceProtectorProcessor->getCountErrors() . '</>'); |
|
46 | 46 | |
47 | - if ($namespaceProtectorProcessor->getCountErrors()>0) { |
|
47 | + if ($namespaceProtectorProcessor->getCountErrors() > 0) { |
|
48 | 48 | return self::FAILURE; |
49 | 49 | } |
50 | 50 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private function createCacheObject(Config $config): CacheInterface |
39 | 39 | { |
40 | 40 | if ($config->enabledCache()) { |
41 | - $directory = \sys_get_temp_dir().self::NAMESPACE_PROTECTOR_CACHE; |
|
41 | + $directory = \sys_get_temp_dir() . self::NAMESPACE_PROTECTOR_CACHE; |
|
42 | 42 | |
43 | 43 | return new SimpleFileCache(new FileSystemPath($directory, true)); |
44 | 44 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | final class PhpFileParser implements ParserInterface |
16 | 16 | { |
17 | - private const ONLY_ONE_ENTRY=1; |
|
17 | + private const ONLY_ONE_ENTRY = 1; |
|
18 | 18 | |
19 | 19 | /** @var \PhpParser\Parser */ |
20 | 20 | private $parser; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | private function fetchAst(PathInterface $pathFile): array |
76 | 76 | { |
77 | 77 | $code = $pathFile->get(); |
78 | - $keyEntryForCache = sha1($code).'.'.base64_encode($pathFile->get()); |
|
78 | + $keyEntryForCache = sha1($code) . '.' . base64_encode($pathFile->get()); |
|
79 | 79 | |
80 | 80 | if (!$this->cache->has($keyEntryForCache)) { |
81 | 81 | $code = \file_get_contents($pathFile->get()); |