@@ -16,7 +16,7 @@ |
||
16 | 16 | Assert::notEmpty($entry); |
17 | 17 | |
18 | 18 | $this->originalEntry = $entry; |
19 | - $this->entry = $entry; |
|
19 | + $this->entry = $entry; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public function equalTo(self $other): bool |
@@ -40,20 +40,20 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | for ($i = 0; $i < $countMax; $i++) { |
43 | - $pathComposer = \getcwd() .DIRECTORY_SEPARATOR. $relativePath; |
|
43 | + $pathComposer = \getcwd() . DIRECTORY_SEPARATOR . $relativePath; |
|
44 | 44 | $realPath = \safe\realpath($pathComposer . self::COMPOSER_JSON); |
45 | 45 | |
46 | 46 | if (\is_readable($realPath) === false) { |
47 | - $relativePath .= '..'.DIRECTORY_SEPARATOR; |
|
47 | + $relativePath .= '..' . DIRECTORY_SEPARATOR; |
|
48 | 48 | continue; |
49 | 49 | } |
50 | 50 | |
51 | 51 | $jsonArray = \safe\json_decode( |
52 | - \safe\file_get_contents($pathComposer.DIRECTORY_SEPARATOR.self::COMPOSER_JSON), |
|
52 | + \safe\file_get_contents($pathComposer . DIRECTORY_SEPARATOR . self::COMPOSER_JSON), |
|
53 | 53 | true |
54 | 54 | ); |
55 | 55 | |
56 | - if ($jsonArray['name']!==self::NAME_PROJECT) { |
|
56 | + if ($jsonArray['name'] !== self::NAME_PROJECT) { |
|
57 | 57 | return new FileSystemPath($pathComposer); |
58 | 58 | } |
59 | 59 | } |
@@ -61,13 +61,13 @@ |
||
61 | 61 | $this->matchKey = new BooleanMatchKey(); |
62 | 62 | $this->matchValue = new BooleanMatchValue(); |
63 | 63 | |
64 | - $this->listNodeProcessor[UseUse::class] = static function (Node $node): string { |
|
64 | + $this->listNodeProcessor[UseUse::class] = static function(Node $node): string { |
|
65 | 65 | |
66 | 66 | /** @var UseUse $node*/ |
67 | 67 | return $node->name->toCodeString(); |
68 | 68 | }; |
69 | 69 | |
70 | - $this->listNodeProcessor[FullyQualified::class] = static function (Node $node): string { |
|
70 | + $this->listNodeProcessor[FullyQualified::class] = static function(Node $node): string { |
|
71 | 71 | |
72 | 72 | /** @var FullyQualified $node*/ |
73 | 73 | return $node->toCodeString(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | /** @var int */ |
12 | 12 | private $type; |
13 | 13 | |
14 | - public function __construct(string $value, int $type=0) |
|
14 | + public function __construct(string $value, int $type = 0) |
|
15 | 15 | { |
16 | 16 | $this->value = $value; |
17 | 17 | $this->type = $type; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | |
8 | 8 | /** @var array<Result> */ |
9 | - private $listResult ; |
|
9 | + private $listResult; |
|
10 | 10 | |
11 | 11 | public function __construct() |
12 | 12 | { |
@@ -9,15 +9,15 @@ |
||
9 | 9 | { |
10 | 10 | protected function execute(InputInterface $input, OutputInterface $output): int |
11 | 11 | { |
12 | - $script_start = $this->startWatch(); |
|
12 | + $script_start = $this->startWatch(); |
|
13 | 13 | |
14 | 14 | $returnValue = parent::execute($input, $output); |
15 | 15 | |
16 | 16 | $elapsed_time = $this->stopWatch($script_start); |
17 | 17 | |
18 | - $output->writeln("<fg=green>Elapsed time: ".$elapsed_time.'</>'); |
|
18 | + $output->writeln("<fg=green>Elapsed time: " . $elapsed_time . '</>'); |
|
19 | 19 | |
20 | - return $returnValue ; |
|
20 | + return $returnValue; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | private function startWatch(): float |
@@ -9,7 +9,7 @@ |
||
9 | 9 | /** @var string */ |
10 | 10 | private $path; |
11 | 11 | |
12 | - public function __construct(string $path, bool $noCheck=false) |
|
12 | + public function __construct(string $path, bool $noCheck = false) |
|
13 | 13 | { |
14 | 14 | if ($noCheck === false) { |
15 | 15 | Assert::readable($path); |
@@ -8,12 +8,12 @@ |
||
8 | 8 | final class ConfigTemplateCreator |
9 | 9 | { |
10 | 10 | private const FILENAME = 'namespace-protector-config.json'; |
11 | - private const FILENAME_VISIBILITY = 'namespace-protector-visibility.json'; |
|
11 | + private const FILENAME_VISIBILITY = 'namespace-protector-visibility.json'; |
|
12 | 12 | private const TEMPLATE_CONFIG_JSON = 'template-config-json'; |
13 | 13 | |
14 | 14 | public static function createJsonTemplateConfig(PathInterface $baseComposerJsonDirectory): void |
15 | 15 | { |
16 | - self::createFileWithBackup($baseComposerJsonDirectory().self::FILENAME, self::TEMPLATE_CONFIG_JSON); |
|
16 | + self::createFileWithBackup($baseComposerJsonDirectory() . self::FILENAME, self::TEMPLATE_CONFIG_JSON); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | public static function createJsonTemplateVisibility(): void |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function evaluate(Iterable $data, Entry $matchMe): bool |
14 | 14 | { |
15 | 15 | foreach ($data as $entry => $value) { |
16 | - if (strpos($matchMe->get(), $entry) !==false) { |
|
16 | + if (strpos($matchMe->get(), $entry) !== false) { |
|
17 | 17 | return true; |
18 | 18 | } |
19 | 19 | } |