@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | $logDir = dirname($logFile); |
50 | 50 | if (!file_exists($logDir) || !is_writable($logDir)) { |
51 | - throw new RuntimeException('You do not have permissions to write CSV report in ' . $logFile); |
|
51 | + throw new RuntimeException('You do not have permissions to write CSV report in '.$logFile); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $availableMetrics = (new Registry())->allForStructures(); |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | if (!$metric instanceof ClassMetric) { |
60 | 60 | continue; |
61 | 61 | } |
62 | - $row = array_map(static function ($key) use ($metric) { |
|
62 | + $row = array_map(static function($key) use ($metric) { |
|
63 | 63 | $data = $metric->get($key); |
64 | - return (!is_scalar($data)) ? 'N/A': $data; |
|
64 | + return (!is_scalar($data)) ? 'N/A' : $data; |
|
65 | 65 | }, $availableMetrics); |
66 | 66 | |
67 | 67 | fputcsv($logPointer, $row); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | $logDir = dirname($logFile); |
46 | 46 | if (!file_exists($logDir) || !is_writable($logDir)) { |
47 | - throw new RuntimeException('You do not have permissions to write JSON report in ' . $logFile); |
|
47 | + throw new RuntimeException('You do not have permissions to write JSON report in '.$logFile); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | file_put_contents($logFile, json_encode($metrics, JSON_PRETTY_PRINT)); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $out .= $this->reportUnitTesting($metrics->get('unitTesting')); |
54 | 54 | } |
55 | 55 | |
56 | - $this->output->write($out . "\n"); |
|
56 | + $this->output->write($out."\n"); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -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; |