@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function addClass($name) |
19 | 19 | { |
20 | 20 | $elements = $this->get('classes'); |
21 | - $elements[] = (string)$name; |
|
21 | + $elements[] = (string) $name; |
|
22 | 22 | $this->set('classes', $elements); |
23 | 23 | } |
24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function setAbstraction($abstraction) |
27 | 27 | { |
28 | 28 | if ($abstraction !== null) { |
29 | - $abstraction = (float)$abstraction; |
|
29 | + $abstraction = (float) $abstraction; |
|
30 | 30 | } |
31 | 31 | $this->set('abstraction', $abstraction); |
32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function setInstability($instability) |
42 | 42 | { |
43 | 43 | if ($instability !== null) { |
44 | - $instability = (float)$instability; |
|
44 | + $instability = (float) $instability; |
|
45 | 45 | } |
46 | 46 | $this->set('instability', $instability); |
47 | 47 | } |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | } |
64 | 64 | $classDependencies = $this->getOutgoingClassDependencies(); |
65 | 65 | $packageDependencies = $this->getOutgoingPackageDependencies(); |
66 | - if (! in_array($className, $classDependencies)) { |
|
66 | + if (!in_array($className, $classDependencies)) { |
|
67 | 67 | $classDependencies[] = $className; |
68 | 68 | $this->set('outgoing_class_dependencies', $classDependencies); |
69 | 69 | } |
70 | - if (! in_array($packageName, $packageDependencies)) { |
|
70 | + if (!in_array($packageName, $packageDependencies)) { |
|
71 | 71 | $packageDependencies[] = $packageName; |
72 | 72 | $this->set('outgoing_package_dependencies', $packageDependencies); |
73 | 73 | } |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | } |
97 | 97 | $classDependencies = $this->getIncomingClassDependencies(); |
98 | 98 | $packageDependencies = $this->getIncomingPackageDependencies(); |
99 | - if (! in_array($className, $classDependencies)) { |
|
99 | + if (!in_array($className, $classDependencies)) { |
|
100 | 100 | $classDependencies[] = $className; |
101 | 101 | $this->set('incoming_class_dependencies', $classDependencies); |
102 | 102 | } |
103 | - if (! in_array($packageName, $packageDependencies)) { |
|
103 | + if (!in_array($packageName, $packageDependencies)) { |
|
104 | 104 | $packageDependencies[] = $packageName; |
105 | 105 | $this->set('incoming_package_dependencies', $packageDependencies); |
106 | 106 | } |
@@ -9,9 +9,9 @@ |
||
9 | 9 | namespace Hal\Component\Ast; |
10 | 10 | |
11 | 11 | if (PHP_VERSION_ID >= 70000) { |
12 | - class_alias(Php7NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser'); |
|
12 | + class_alias(Php7NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser'); |
|
13 | 13 | } else { |
14 | - class_alias(Php5NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser'); |
|
14 | + class_alias(Php5NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | /** |
@@ -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 | /** |