Completed
Pull Request — master (#265)
by Vincent
13:10
created
src/Hal/Metric/Class_/Complexity/KanDefectVisitor.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Hal\Metric\Class_\Complexity;
3 3
 
4
-use Hal\Component\Reflected\Method;
5 4
 use Hal\Metric\Metrics;
6 5
 use PhpParser\Node;
7 6
 use PhpParser\Node\Stmt;
Please login to merge, or discard this patch.
src/Hal/Metric/System/Changes/GitChanges.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Hal/Metric/System/UnitTesting/UnitTesting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,10 +89,10 @@
 block discarded – undo
89 89
 
90 90
             // list of externals sources of unit test
91 91
             $metric = $metricsOfUnitTest->get($classname);
92
-            $externals = (array)$metric->get('externals');
92
+            $externals = (array) $metric->get('externals');
93 93
 
94 94
             // global stats for each test
95
-            $infoAboutTests[$classname] = (object)[
95
+            $infoAboutTests[$classname] = (object) [
96 96
                 'nbExternals' => sizeof(array_unique($externals)),
97 97
                 'externals' => array_unique($externals),
98 98
                 'filename' => $fileOfUnitTest,
Please login to merge, or discard this patch.
src/Hal/Metric/Helper/RoleOfMethodDetector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         // build a fingerprint of the given method
49 49
         $fingerprintOfMethod = [];
50
-        iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) {
50
+        iterate_over_node($node, function($node) use (&$fingerprintOfMethod) {
51 51
 
52 52
             // avoid cast
53 53
             if ($node instanceof Cast) {
Please login to merge, or discard this patch.
artifacts/phar/build.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.