Passed
Pull Request — master (#5)
by
unknown
03:47
created
src/DependencyDumper/DependencyResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Commands/CycleDetectCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
conf/rule_sample.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
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
 ];
Please login to merge, or discard this patch.
src/Inspector/RuleViolationDetector/DependencyRuleFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/DependencyDumper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Commands/AnalyzeDependencyCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
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
 block discarded – undo
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}");
Please login to merge, or discard this patch.
conf/this_repository_rule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         ],
61 61
         'graph' => [
62 62
             'define' => ['\Fhaculty\Graph\\'],
63
-            'depender' => ['graph_builder', 'dependency_graph', 'inspectors', 'exceptions'],        // I will remove inspectors...
63
+            'depender' => ['graph_builder', 'dependency_graph', 'inspectors', 'exceptions'], // I will remove inspectors...
64 64
             'graph' => ['folding']
65 65
         ]
66 66
     ]
Please login to merge, or discard this patch.
src/DependencyGraph/StructuralElementPatternMatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
     public static function setPhpNativeClasses(array $nativeClasses): void
130 130
     {
131
-        self::$nativeClasses = array_map(function (string $className) {
131
+        self::$nativeClasses = array_map(function(string $className) {
132 132
             return substr($className, 0, 1) !== '\\' ? "\\{$className}" : $className;
133 133
         }, $nativeClasses);
134 134
     }
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
     public function toArray(): array
137 137
     {
138 138
         return [
139
-            'include' => array_map(function (Matchable $fqsen) {
139
+            'include' => array_map(function(Matchable $fqsen) {
140 140
                 return $fqsen->getPattern();
141 141
             }, $this->patterns),
142
-            'exclude' => array_map(function (Matchable $fqsen) {
142
+            'exclude' => array_map(function(Matchable $fqsen) {
143 143
                 return $fqsen->getPattern();
144 144
             }, $this->excludePatterns)
145 145
         ];
Please login to merge, or discard this patch.
src/DependencyGraph.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         // Breadth first search
98 98
         do {
99 99
             $target = array_shift($queue);
100
-            $visited[$target->getId()]= $target;
100
+            $visited[$target->getId()] = $target;
101 101
 
102 102
             foreach ($target->getVerticesEdgeTo()->getMap() as $id => $vertexTo) {
103 103
                 if (!isset($visited[$id])) {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
                 /** @var Directed $edge */
154 154
                 $types = $edge->getAttribute(DependencyGraph::DEPENDENCY_TYPE_KEY) ?? [];
155 155
 
156
-                $ret[$vertex->getId()][$edge->getVertexEnd()->getId()] = array_map(function (DependencyType $type) {
156
+                $ret[$vertex->getId()][$edge->getVertexEnd()->getId()] = array_map(function(DependencyType $type) {
157 157
                     return $type->toString();
158 158
                 }, $types);
159 159
             }
Please login to merge, or discard this patch.