Completed
Push — master ( c43217...d06016 )
by personal
22s queued 13s
created
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/Metric/Class_/Complexity/KanDefectVisitor.php 1 patch
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.
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.
src/Hal/Component/Output/TestOutput.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function writeln($message)
25 25
     {
26
-        $this->write(PHP_EOL . $message);
26
+        $this->write(PHP_EOL.$message);
27 27
         return $this;
28 28
     }
29 29
 
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Text/LengthVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             $code = preg_replace('!/\*.*?\*/!s', '', $code);
63 63
 
64 64
             // count and remove single line comments
65
-            $code = preg_replace_callback('!(\'[^\']*\'|"[^"]*")|((?:#|\/\/).*$)!m', function (array $matches) use (&$cloc) {
65
+            $code = preg_replace_callback('!(\'[^\']*\'|"[^"]*")|((?:#|\/\/).*$)!m', function(array $matches) use (&$cloc) {
66 66
                 if (isset($matches[2])) {
67 67
                     $cloc += 1;
68 68
                 }
Please login to merge, or discard this patch.
src/Hal/Violation/Package/StableDependenciesPrinciple.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function apply(Metric $metric)
23 23
     {
24
-        if (! $metric instanceof PackageMetric) {
24
+        if (!$metric instanceof PackageMetric) {
25 25
             return;
26 26
         }
27 27
         $instability = $metric->getInstability();
28 28
         $violatingInstabilities = array_filter(
29 29
             $metric->getDependentInstabilities(),
30
-            function ($otherInstability) use ($instability) {
30
+            function($otherInstability) use ($instability) {
31 31
                 return $otherInstability >= $instability;
32 32
             }
33 33
         );
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $count = count($this->violatingInstabilities);
49 49
         $thisInstability = round($this->metric->getInstability(), 3);
50
-        $packages = implode("\n* ", array_map(function ($name, $instability) {
50
+        $packages = implode("\n* ", array_map(function($name, $instability) {
51 51
             $name = $name === '\\' ? 'global' : substr($name, 0, -1);
52 52
             $instability = round($instability, 3);
53 53
             return "$name ($instability)";
Please login to merge, or discard this patch.
src/Hal/Metric/PackageMetric.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
         }
48 48
         $classDependencies = $this->getOutgoingClassDependencies();
49 49
         $packageDependencies = $this->getOutgoingPackageDependencies();
50
-        if (! in_array($className, $classDependencies)) {
50
+        if (!in_array($className, $classDependencies)) {
51 51
             $classDependencies[] = $className;
52 52
             $this->set('outgoing_class_dependencies', $classDependencies);
53 53
         }
54
-        if (! in_array($packageName, $packageDependencies)) {
54
+        if (!in_array($packageName, $packageDependencies)) {
55 55
             $packageDependencies[] = $packageName;
56 56
             $this->set('outgoing_package_dependencies', $packageDependencies);
57 57
         }
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
         }
76 76
         $classDependencies = $this->getIncomingClassDependencies();
77 77
         $packageDependencies = $this->getIncomingPackageDependencies();
78
-        if (! in_array($className, $classDependencies)) {
78
+        if (!in_array($className, $classDependencies)) {
79 79
             $classDependencies[] = $className;
80 80
             $this->set('incoming_class_dependencies', $classDependencies);
81 81
         }
82
-        if (! in_array($packageName, $packageDependencies)) {
82
+        if (!in_array($packageName, $packageDependencies)) {
83 83
             $packageDependencies[] = $packageName;
84 84
             $this->set('incoming_package_dependencies', $packageDependencies);
85 85
         }
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageAbstraction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     {
12 12
         /* @var $packages PackageMetric[] */
13 13
         foreach ($metrics->all() as $eachPackage) {
14
-            if (! $eachPackage instanceof PackageMetric) {
14
+            if (!$eachPackage instanceof PackageMetric) {
15 15
                 continue;
16 16
             }
17 17
             $abstractClassCount = 0;
Please login to merge, or discard this patch.
src/Hal/Metric/Package/PackageCollectingVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
                 $package = $matches[1];
43 43
             }
44 44
             if (preg_match('/^\s*\* @subpackage (.*)/m', $docBlockText, $matches)) {
45
-                $package = $package . '\\' . $matches[1];
45
+                $package = $package.'\\'.$matches[1];
46 46
             }
47 47
 
48
-            $packageName = $package . '\\';
49
-            if (! $packageMetric = $this->metrics->get($packageName)) {
48
+            $packageName = $package.'\\';
49
+            if (!$packageMetric = $this->metrics->get($packageName)) {
50 50
                 $packageMetric = new PackageMetric($packageName);
51 51
                 $this->metrics->attach($packageMetric);
52 52
             }
Please login to merge, or discard this patch.