@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require __DIR__ . '/_header.php'; ?> |
|
1 | +<?php require __DIR__.'/_header.php'; ?> |
|
2 | 2 | |
3 | 3 | <div class="row"> |
4 | 4 | <div class="column"> |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | </div> |
40 | 40 | |
41 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
41 | +<?php require __DIR__.'/_footer.php'; ?> |
|
42 | 42 | |
43 | 43 | |
44 | 44 | <script type="text/javascript"> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -require __DIR__ . '/_header.php'; ?> |
|
2 | +require __DIR__.'/_header.php'; ?> |
|
3 | 3 | |
4 | 4 | <?php |
5 | 5 | |
@@ -88,4 +88,4 @@ discard block |
||
88 | 88 | </div> |
89 | 89 | |
90 | 90 | |
91 | -<?php require __DIR__ . '/_footer.php'; ?> |
|
92 | 91 | \ No newline at end of file |
92 | +<?php require __DIR__.'/_footer.php'; ?> |
|
93 | 93 | \ No newline at end of file |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $operands = []; |
57 | 57 | $operators = []; |
58 | 58 | |
59 | - iterate_over_node($node, function ($node) use (&$operators, &$operands) { |
|
59 | + iterate_over_node($node, function($node) use (&$operators, &$operands) { |
|
60 | 60 | |
61 | 61 | if ( |
62 | 62 | $node instanceof Node\Expr\BinaryOp |
@@ -82,7 +82,7 @@ |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | $class->set('methods', $methods); |
85 | - $class->set('nbMethodsIncludingGettersSetters', sizeof($methods) ); |
|
85 | + $class->set('nbMethodsIncludingGettersSetters', sizeof($methods)); |
|
86 | 86 | $class->set('nbMethods', sizeof($methods) - ($nbGetters + $nbSetters)); |
87 | 87 | $class->set('nbMethodsPrivate', $methodsPrivate); |
88 | 88 | $class->set('nbMethodsPublic', $methodsPublic); |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $output = 0; |
53 | 53 | $fanout = []; |
54 | 54 | |
55 | - iterate_over_node($node, function ($node) use (&$output, &$fanout) { |
|
55 | + iterate_over_node($node, function($node) use (&$output, &$fanout) { |
|
56 | 56 | switch (true) { |
57 | 57 | case $node instanceof Stmt\Return_: |
58 | 58 | $output++; |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | foreach ($node->stmts as $stmt) { |
46 | 46 | if ($stmt instanceof Stmt\ClassMethod) { |
47 | 47 | |
48 | - if (!$graph->has($stmt->name . '()')) { |
|
49 | - $graph->insert(new TreeNode($stmt->name . '()')); |
|
48 | + if (!$graph->has($stmt->name.'()')) { |
|
49 | + $graph->insert(new TreeNode($stmt->name.'()')); |
|
50 | 50 | } |
51 | - $from = $graph->get($stmt->name . '()'); |
|
51 | + $from = $graph->get($stmt->name.'()'); |
|
52 | 52 | |
53 | - \iterate_over_node($stmt, function ($node) use ($from, &$graph) { |
|
53 | + \iterate_over_node($stmt, function($node) use ($from, &$graph) { |
|
54 | 54 | |
55 | 55 | if ($node instanceof Node\Expr\PropertyFetch && isset($node->var->name) && $node->var->name == 'this') { |
56 | 56 | $name = getNameOfNode($node); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if (!$node->var instanceof Node\Expr\New_ && isset($node->var->name) && getNameOfNode($node->var) === 'this') { |
69 | 69 | // use of method call $this->xxx(); |
70 | 70 | // use of attribute $this->xxx; |
71 | - $name = getNameOfNode($node->name) . '()'; |
|
71 | + $name = getNameOfNode($node->name).'()'; |
|
72 | 72 | if (!$graph->has($name)) { |
73 | 73 | $graph->insert(new TreeNode($name)); |
74 | 74 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | $select = $while = $if = 0; |
44 | 44 | |
45 | - iterate_over_node($node, function ($node) use (&$while, &$select, &$if) { |
|
45 | + iterate_over_node($node, function($node) use (&$while, &$select, &$if) { |
|
46 | 46 | switch (true) { |
47 | 47 | case $node instanceof Stmt\Do_: |
48 | 48 | case $node instanceof Stmt\Foreach_: |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | }); |
60 | 60 | |
61 | - $defect = 0.15 + 0.23 * $while + 0.22 * $select + 0.07 * $if; |
|
61 | + $defect = 0.15 + 0.23 * $while + 0.22 * $select + 0.07 * $if; |
|
62 | 62 | $class->set('kanDefect', round($defect, 2)); |
63 | 63 | } |
64 | 64 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | $r = shell_exec(sprintf('%s --version', $bin)); |
54 | - if(!preg_match('!git version!', $r)) { |
|
54 | + if (!preg_match('!git version!', $r)) { |
|
55 | 55 | throw new ConfigException(sprintf('Git binary (%s) incorrect', $bin)); |
56 | 56 | } |
57 | 57 |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | -chdir(__DIR__ . '/../../'); |
|
2 | +chdir(__DIR__.'/../../'); |
|
3 | 3 | |
4 | 4 | if (!file_exists('vendor/autoload.php')) { |
5 | - echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!' . PHP_EOL; |
|
5 | + echo '[ERROR] It\'s required to run "composer install" before building PhpMetrics!'.PHP_EOL; |
|
6 | 6 | exit(1); |
7 | 7 | } |
8 | 8 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | if (preg_match($exclude, $file)) { |
22 | 22 | continue; |
23 | 23 | } |
24 | - $path = str_replace(__DIR__ . '/', '', $file); |
|
24 | + $path = str_replace(__DIR__.'/', '', $file); |
|
25 | 25 | $phar->addFromString($path, file_get_contents($file)); |
26 | 26 | } |
27 | 27 | |
@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | |
53 | 53 | function rglob($pattern = '*', $flags = 0, $path = '') |
54 | 54 | { |
55 | - $paths = glob($path . '*', GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT); |
|
56 | - $files = glob($path . $pattern, $flags); |
|
55 | + $paths = glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT); |
|
56 | + $files = glob($path.$pattern, $flags); |
|
57 | 57 | foreach ($paths as $path) { |
58 | 58 | $files = array_merge($files, rglob($pattern, $flags, $path)); |
59 | 59 | } |