@@ -44,7 +44,7 @@ |
||
44 | 44 | return; |
45 | 45 | } |
46 | 46 | if (!file_exists(dirname($logFile)) || !is_writable(dirname($logFile))) { |
47 | - throw new \RuntimeException('You don\'t have permissions to write CSV report in ' . $logFile); |
|
47 | + throw new \RuntimeException('You don\'t have permissions to write CSV report in '.$logFile); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | $availables = (new Registry())->allForStructures(); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | return; |
43 | 43 | } |
44 | 44 | if (!file_exists(dirname($logFile)) || !is_writable(dirname($logFile))) { |
45 | - throw new \RuntimeException('You don\'t have permissions to write JSON report in ' . $logFile); |
|
45 | + throw new \RuntimeException('You don\'t have permissions to write JSON report in '.$logFile); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | file_put_contents($logFile, json_encode($metrics, JSON_PRETTY_PRINT)); |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $metrics = new Metrics(); |
79 | 79 | |
80 | 80 | // traverse all |
81 | - $whenToStop = function () { |
|
81 | + $whenToStop = function() { |
|
82 | 82 | return true; |
83 | 83 | }; |
84 | 84 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function addEdge(Node $from, Node $to) |
29 | 29 | { |
30 | - $key = $from->getUniqueId() . '->' . $to->getUniqueId(); |
|
30 | + $key = $from->getUniqueId().'->'.$to->getUniqueId(); |
|
31 | 31 | |
32 | 32 | if (isset($this->edgesMap[$key])) { |
33 | 33 | return $this; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | public function apply(Metric $metric) |
27 | 27 | { |
28 | - if (! $metric instanceof ClassMetric) { |
|
28 | + if (!$metric instanceof ClassMetric) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | public function apply(Metric $metric) |
27 | 27 | { |
28 | - if (! $metric instanceof ClassMetric) { |
|
28 | + if (!$metric instanceof ClassMetric) { |
|
29 | 29 | return; |
30 | 30 | } |
31 | 31 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | $output = new CliOutput(); |
23 | 23 | |
24 | 24 | // issues and debug |
25 | - $issuer = (new Issuer($output));//->enable(); |
|
25 | + $issuer = (new Issuer($output)); //->enable(); |
|
26 | 26 | |
27 | 27 | // config |
28 | 28 | $config = (new Parser())->parse($argv); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function __construct(Mother $traverser, $stopCondition = null) |
28 | 28 | { |
29 | 29 | if (null === $stopCondition) { |
30 | - $stopCondition = function ($node) { |
|
30 | + $stopCondition = function($node) { |
|
31 | 31 | if ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) { |
32 | 32 | return false; |
33 | 33 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | 'PhpParser\\Node\\Param', |
79 | 79 | 'PhpParser\\Node\\Expr\\Variable', |
80 | 80 | 'PhpParser\\Node\\Name', |
81 | - ],[ |
|
81 | + ], [ |
|
82 | 82 | // function setOk(?bool $ok): self { $this->isOk = $ok; return $this; } |
83 | 83 | 'PhpParser\\Node\\Stmt\\ClassMethod', |
84 | 84 | 'PhpParser\\Node\\Stmt\\Expression', |
@@ -98,13 +98,13 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function detects($node) |
100 | 100 | { |
101 | - if (! $node instanceof ClassMethod) { |
|
101 | + if (!$node instanceof ClassMethod) { |
|
102 | 102 | return null; |
103 | 103 | } |
104 | 104 | |
105 | 105 | // build a fingerprint of the given method |
106 | 106 | $fingerprintOfMethod = []; |
107 | - iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) { |
|
107 | + iterate_over_node($node, function($node) use (&$fingerprintOfMethod) { |
|
108 | 108 | // avoid identifier (php-parser:^4) |
109 | 109 | if ($node instanceof Identifier) { |
110 | 110 | return; |