@@ -67,7 +67,7 @@ |
||
| 67 | 67 | ]; |
| 68 | 68 | |
| 69 | 69 | $otherComponent = [ |
| 70 | - 'define' => array_merge(['\\'], array_map(function (string $className) { |
|
| 70 | + 'define' => array_merge(['\\'], array_map(function(string $className) { |
|
| 71 | 71 | return '!' . $className; |
| 72 | 72 | }, $classesInPhpDoc)), |
| 73 | 73 | ]; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace DependencyAnalyzer\DependencyDumper; |
| 5 | 5 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | { |
| 222 | 222 | $functionName = $node->name->name; |
| 223 | 223 | if (isset($node->namespacedName)) { |
| 224 | - $functionName = (string)$node->namespacedName; |
|
| 224 | + $functionName = (string) $node->namespacedName; |
|
| 225 | 225 | } |
| 226 | 226 | $functionNameName = new \PhpParser\Node\Name($functionName); |
| 227 | 227 | if ($this->broker->hasCustomFunction($functionNameName, null)) { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | // Breadth first search |
| 56 | 56 | do { |
| 57 | 57 | $target = array_shift($queue); |
| 58 | - $visited[$target->getId()]= $target; |
|
| 58 | + $visited[$target->getId()] = $target; |
|
| 59 | 59 | |
| 60 | 60 | foreach ($target->getVerticesEdgeTo()->getMap() as $id => $vertexTo) { |
| 61 | 61 | if (!isset($visited[$id])) { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | ->addHeader('class') |
| 33 | 33 | ->addHeader(''); |
| 34 | 34 | foreach ($cycle as $index => $class) { |
| 35 | - $haveNextClass = (bool)($index < (count($cycle) - 1)); |
|
| 35 | + $haveNextClass = (bool) ($index < (count($cycle) - 1)); |
|
| 36 | 36 | $table->addRow([$class, $haveNextClass ? '->' : '']); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | 'dependee' => ['!Facade'] |
| 25 | 25 | ], |
| 26 | 26 | 'Facade' => [ |
| 27 | - 'define' => ['\App','\Artisan','\Auth','\Blade','\Broadcast','\Bus','\Cache','\Config','\Cookie','\Crypt','\DB','\Event','\File','\Gate','\Hash','\Lang','\Log','\Mail','\Notification','\Password','\Queue','\Redirect','\Request','\Response','\Route','\Schema','\Session','\Storage','\URL','\Validator','\View'] |
|
| 27 | + 'define' => ['\App', '\Artisan', '\Auth', '\Blade', '\Broadcast', '\Bus', '\Cache', '\Config', '\Cookie', '\Crypt', '\DB', '\Event', '\File', '\Gate', '\Hash', '\Lang', '\Log', '\Mail', '\Notification', '\Password', '\Queue', '\Redirect', '\Request', '\Response', '\Route', '\Schema', '\Session', '\Storage', '\URL', '\Validator', '\View'] |
|
| 28 | 28 | ] |
| 29 | 29 | ] |
| 30 | 30 | ]; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | foreach ($ruleDefinitions as $ruleName => $ruleDefinition) { |
| 19 | 19 | $this->verifyDefinition($ruleDefinition); |
| 20 | 20 | if (is_int($ruleName)) { |
| 21 | - $ruleName = (string)$ruleName; |
|
| 21 | + $ruleName = (string) $ruleName; |
|
| 22 | 22 | } |
| 23 | 23 | $rules[] = $this->createDependencyRule($ruleName, $ruleDefinition); |
| 24 | 24 | } |
@@ -15,12 +15,12 @@ |
||
| 15 | 15 | 'description' => ['Analyze repository, and build DependencyGraph'], |
| 16 | 16 | 'depender' => ['commands'] |
| 17 | 17 | ], |
| 18 | - 'unknown class reflection' => [ // I will remove this component............ |
|
| 18 | + 'unknown class reflection' => [// I will remove this component............ |
|
| 19 | 19 | 'define' => [$unknownClassReflection], |
| 20 | 20 | 'description' => 'temporary component........', |
| 21 | 21 | 'depender' => ['dependency_dumper', 'graph_builder'] |
| 22 | 22 | ], |
| 23 | - 'graph_builder' => [ // I'm thinking about this component position. |
|
| 23 | + 'graph_builder' => [// I'm thinking about this component position. |
|
| 24 | 24 | 'define' => [$graphBuilderComponent], |
| 25 | 25 | 'description' => ['Build DependencyGraph'], |
| 26 | 26 | 'depender' => ['dependency_dumper'] |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $excludeFiles = $this->getAllFilesRecursive($excludePaths); |
| 83 | 83 | $files = $this->getAllFilesRecursive($paths); |
| 84 | 84 | |
| 85 | - $this->notifyDumpStart(array_reduce($files, function (int $max, string $file) use ($excludeFiles) { |
|
| 85 | + $this->notifyDumpStart(array_reduce($files, function(int $max, string $file) use ($excludeFiles) { |
|
| 86 | 86 | if (!in_array($file, $excludeFiles)) { |
| 87 | 87 | $max++; |
| 88 | 88 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace DependencyAnalyzer\Commands; |
| 5 | 5 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | protected function createDependencyGraph(OutputInterface $output, array $paths, array $excludePaths = []): DependencyGraph |
| 62 | 62 | { |
| 63 | - $convertRealpathClosure = function ($path) { |
|
| 63 | + $convertRealpathClosure = function($path) { |
|
| 64 | 64 | $realpath = realpath($path); |
| 65 | 65 | if (!is_file($realpath) && !is_dir($realpath)) { |
| 66 | 66 | throw new InvalidCommandArgumentException("path was not found: {$realpath}"); |