@@ -37,7 +37,7 @@ |
||
37 | 37 | public static function createFromFileName($filename) |
38 | 38 | { |
39 | 39 | if (!\is_readable($filename)) { |
40 | - throw new InvalidArgumentException('Cannot read configuration file ' . $filename . '.'); |
|
40 | + throw new InvalidArgumentException('Cannot read configuration file '.$filename.'.'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $ext = static::checkAllowed(\pathinfo($filename, \PATHINFO_EXTENSION)); |
@@ -153,7 +153,7 @@ |
||
153 | 153 | |
154 | 154 | // Parse instantiations and static calls. |
155 | 155 | $dependencies = []; |
156 | - \iterate_over_node($stmt, function ($node) use (&$dependencies) { |
|
156 | + \iterate_over_node($stmt, function($node) use (&$dependencies) { |
|
157 | 157 | switch (true) { |
158 | 158 | case $node instanceof Node\Expr\New_: |
159 | 159 | // new MyClass |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function __construct($stopCondition = null) |
33 | 33 | { |
34 | 34 | if (null === $stopCondition) { |
35 | - $stopCondition = function (Node $node) { |
|
35 | + $stopCondition = function(Node $node) { |
|
36 | 36 | return !($node instanceof ClassLike); |
37 | 37 | }; |
38 | 38 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $metrics = new Metrics(); |
82 | 82 | |
83 | 83 | // Traverse all files. |
84 | - $whenToStop = function () { |
|
84 | + $whenToStop = function() { |
|
85 | 85 | return true; |
86 | 86 | }; |
87 | 87 |
@@ -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; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $output = 0; |
60 | 60 | $fanOut = []; |
61 | 61 | |
62 | - \iterate_over_node($node, function ($node) use (&$output, &$fanOut) { |
|
62 | + \iterate_over_node($node, function($node) use (&$output, &$fanOut) { |
|
63 | 63 | switch (true) { |
64 | 64 | case $node instanceof Stmt\Return_: |
65 | 65 | $output++; |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | continue; |
50 | 50 | } |
51 | 51 | |
52 | - $graph->insertFromName($stmt->name . '()'); |
|
53 | - $from = $graph->get($stmt->name . '()'); |
|
52 | + $graph->insertFromName($stmt->name.'()'); |
|
53 | + $from = $graph->get($stmt->name.'()'); |
|
54 | 54 | |
55 | - \iterate_over_node($stmt, function ($node) use ($from, $graph) { |
|
55 | + \iterate_over_node($stmt, function($node) use ($from, $graph) { |
|
56 | 56 | $nodeChecker = new NodeChecker($node); |
57 | 57 | |
58 | 58 | if ($nodeChecker->isCalledByProperty()) { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | if ($nodeChecker->isCalledByMethodCall()) { |
66 | 66 | // use of method call $this->xxx(); |
67 | - $name = \getNameOfNode($node->name) . '()'; |
|
67 | + $name = \getNameOfNode($node->name).'()'; |
|
68 | 68 | $graph->addEdge($from, $graph->insertFromName($name)->get($name)); |
69 | 69 | return; |
70 | 70 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $operands = []; |
63 | 63 | $operators = []; |
64 | 64 | |
65 | - \iterate_over_node($node, function ($node) use (&$operators, &$operands) { |
|
65 | + \iterate_over_node($node, function($node) use (&$operators, &$operands) { |
|
66 | 66 | |
67 | 67 | if ($node instanceof Node\Expr\BinaryOp |
68 | 68 | || $node instanceof Node\Expr\AssignOp |
@@ -86,7 +86,7 @@ |
||
86 | 86 | $code = \preg_replace('!/\*.*?\*/!s', '', $code); |
87 | 87 | |
88 | 88 | // Count and remove single line comments. |
89 | - $incrementCLoc = function (array $matches) use (&$cLoc) { |
|
89 | + $incrementCLoc = function(array $matches) use (&$cLoc) { |
|
90 | 90 | $cLoc += isset($matches[2]); |
91 | 91 | return $matches[1]; |
92 | 92 | }; |