@@ -62,20 +62,20 @@ discard block |
||
| 62 | 62 | // extends |
| 63 | 63 | if (isset($node->extends)) { |
| 64 | 64 | if (is_array($node->extends)) { |
| 65 | - foreach ((array)$node->extends as $interface) { |
|
| 66 | - array_push($dependencies, (string)$interface); |
|
| 67 | - array_push($parents, (string)$interface); |
|
| 65 | + foreach ((array) $node->extends as $interface) { |
|
| 66 | + array_push($dependencies, (string) $interface); |
|
| 67 | + array_push($parents, (string) $interface); |
|
| 68 | 68 | } |
| 69 | 69 | } else { |
| 70 | - array_push($dependencies, (string)$node->extends); |
|
| 71 | - array_push($parents, (string)$node->extends); |
|
| 70 | + array_push($dependencies, (string) $node->extends); |
|
| 71 | + array_push($parents, (string) $node->extends); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // implements |
| 76 | 76 | if (isset($node->implements)) { |
| 77 | 77 | foreach ($node->implements as $interface) { |
| 78 | - array_push($dependencies, (string)$interface); |
|
| 78 | + array_push($dependencies, (string) $interface); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | // return |
| 85 | 85 | if (isset($stmt->returnType)) { |
| 86 | 86 | if ($stmt->returnType instanceof Node\Name\FullyQualified) { |
| 87 | - array_push($dependencies, (string)$stmt->returnType); |
|
| 87 | + array_push($dependencies, (string) $stmt->returnType); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | foreach ($stmt->params as $param) { |
| 93 | 93 | if ($param->type) { |
| 94 | 94 | if ($param->type instanceof Node\Name\FullyQualified) { |
| 95 | - array_push($dependencies, (string)$param->type); |
|
| 95 | + array_push($dependencies, (string) $param->type); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // instantiations, static calls |
| 101 | - \iterate_over_node($stmt, function ($node) use (&$dependencies) { |
|
| 101 | + \iterate_over_node($stmt, function($node) use (&$dependencies) { |
|
| 102 | 102 | switch (true) { |
| 103 | 103 | case $node instanceof Node\Expr\New_: |
| 104 | 104 | // new MyClass |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | foreach ($matches[1] as $check) { |
| 118 | 118 | foreach ($this->uses as $use) { |
| 119 | 119 | if ($use->alias === $check) { |
| 120 | - array_push($dependencies, (string)($use->name)); |
|
| 120 | + array_push($dependencies, (string) ($use->name)); |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | } |
@@ -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)); |