Completed
Pull Request — master (#290)
by Benjamin
04:53
created
src/Hal/Metric/Class_/ClassEnumVisitor.php 2 patches
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_;
3 3
 
4
-use Hal\Component\Reflected\Method;
5 4
 use Hal\Metric\ClassMetric;
6 5
 use Hal\Metric\FunctionMetric;
7 6
 use Hal\Metric\Helper\RoleOfMethodDetector;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
                 $class->set('interface', true);
41 41
             } else {
42 42
 
43
-                if(null === $node->name) {
43
+                if (null === $node->name) {
44 44
                     // anonymous class
45
-                    $name = 'anonymous@' . spl_object_hash($node);
45
+                    $name = 'anonymous@'.spl_object_hash($node);
46 46
                 } else {
47 47
                     $name = $node->namespacedName->toString();
48 48
                 }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
 
92 92
             $class->set('methods', $methods);
93
-            $class->set('nbMethodsIncludingGettersSetters', sizeof($methods) );
93
+            $class->set('nbMethodsIncludingGettersSetters', sizeof($methods));
94 94
             $class->set('nbMethods', sizeof($methods) - ($nbGetters + $nbSetters));
95 95
             $class->set('nbMethodsPrivate', $methodsPrivate);
96 96
             $class->set('nbMethodsPublic', $methodsPublic);
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Complexity/CyclomaticComplexityVisitor.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                 if ($stmt instanceof Stmt\ClassMethod) {
56 56
 
57 57
                     // iterate over children, recursively
58
-                    $cb = function ($node) use (&$cb) {
58
+                    $cb = function($node) use (&$cb) {
59 59
                         $ccn = 0;
60 60
                         if (isset($node->stmts) && $node->stmts) {
61 61
                             foreach ($node->stmts as $child) {
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Component/MaintainabilityIndexVisitor.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 
4 4
 use Hal\Metric\FunctionMetric;
5 5
 use Hal\Metric\Metrics;
6
-use Hoa\Ruler\Model\Bag\Scalar;
7 6
 use PhpParser\Node;
8 7
 use PhpParser\Node\Stmt;
9 8
 use PhpParser\NodeVisitorAbstract;
Please login to merge, or discard this patch.
src/Hal/Violation/Violations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $string = '';
46 46
         foreach ($this->data as $violation) {
47
-            $string .= $violation->getName() . ',';
47
+            $string .= $violation->getName().',';
48 48
         }
49 49
         return $string;
50 50
     }
Please login to merge, or discard this patch.
src/Hal/Component/Ast/NodeTraverser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
     {
26 26
         parent::__construct($cloneNodes);
27 27
 
28
-        if(null === $stopCondition) {
28
+        if (null === $stopCondition) {
29 29
             $stopCondition = function($node) {
30
-                if($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) {
30
+                if ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) {
31 31
                     return false;
32 32
                 }
33 33
 
Please login to merge, or discard this patch.
src/Hal/Component/File/Finder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,14 +71,14 @@
 block discarded – undo
71 71
         $files = array();
72 72
         foreach ($paths as $path) {
73 73
             if (is_dir($path)) {
74
-                $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
74
+                $path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
75 75
                 $directory = new RecursiveDirectoryIterator($path, $this->flags);
76 76
                 $iterator = new RecursiveIteratorIterator($directory);
77 77
 
78 78
                 $filterRegex = sprintf(
79 79
                     '`^%s%s$`',
80
-                    !empty($this->excludedDirs) ? '((?!' . implode('|', $this->excludedDirs) . ').)+' : '.+',
81
-                    '\.(' . implode('|', $this->extensions) . ')'
80
+                    !empty($this->excludedDirs) ? '((?!'.implode('|', $this->excludedDirs).').)+' : '.+',
81
+                    '\.('.implode('|', $this->extensions).')'
82 82
                 );
83 83
 
84 84
                 $filteredIterator = new RegexIterator(
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/relations.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $relations = [];
5 5
 $classesCp = [];
6 6
 foreach ($classes as $class) {
7 7
 
8
-    $class['name'] = '\\' . $class['name'];
8
+    $class['name'] = '\\'.$class['name'];
9 9
     $classesCp[$class['name']] = $class;
10 10
     $classesCp[$class['name']]['externals'] = [];
11 11
 
12 12
 
13 13
     foreach ($class['externals'] as &$ext) {
14
-        $ext = '\\' . $ext;
14
+        $ext = '\\'.$ext;
15 15
         if (!isset($classes[$ext])) {
16 16
             $classesCp[$ext] = [
17 17
                 'name' => $ext,
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
     }
23 23
 }
24 24
 foreach ($classesCp as $class) {
25
-    array_push($relations, (object)[
25
+    array_push($relations, (object) [
26 26
         'name' => $class['name'],
27 27
         'size' => 3000,
28
-        'relations' => (array)array_values(array_unique($class['externals'])),
28
+        'relations' => (array) array_values(array_unique($class['externals'])),
29 29
     ]);
30 30
 }
31 31
 ?>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     </div>
41 41
 </div>
42 42
 
43
-<?php require __DIR__ . '/_footer.php'; ?>
43
+<?php require __DIR__.'/_footer.php'; ?>
44 44
 
45 45
 
46 46
 <script type="text/javascript">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/complexity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
     <div class="row">
5 5
         <div class="column">
@@ -79,4 +79,4 @@  discard block
 block discarded – undo
79 79
     </div>
80 80
 
81 81
 
82
-<?php require __DIR__ . '/_footer.php'; ?>
83 82
\ No newline at end of file
83
+<?php require __DIR__.'/_footer.php'; ?>
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/git.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
 
5 5
 <?php
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
     $history = array_slice($history, -24);
13 13
     $json = [];
14 14
     foreach ($history as $date => $values) {
15
-        array_push($json, (object)[
15
+        array_push($json, (object) [
16 16
             'date' => $date,
17 17
             'key' => 'Additions',
18 18
             'value' => abs($values['additions']),
19 19
         ]);
20
-        array_push($json, (object)[
20
+        array_push($json, (object) [
21 21
             'date' => $date,
22 22
             'key' => 'Removes',
23 23
             'value' => abs($values['removes']),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     </div>
95 95
 </div>
96 96
 
97
-<?php require __DIR__ . '/_footer.php'; ?>
97
+<?php require __DIR__.'/_footer.php'; ?>
98 98
 
99 99
 
100 100
 <script type="text/javascript">
Please login to merge, or discard this patch.