Completed
Push — master ( c43217...d06016 )
by personal
22s queued 13s
created
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/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/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.
rector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 return RectorConfig::configure()
6 6
     ->withPaths([
7
-        __DIR__ . '/src',
8
-        __DIR__ . '/tests',
7
+        __DIR__.'/src',
8
+        __DIR__.'/tests',
9 9
     ])
10 10
     ->withSets([
11 11
         \Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_110,
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     }
103 103
 
104 104
     if ($node instanceof \PhpParser\Node\Name) {
105
-        if(!property_exists($node, 'parts') || null === $node->parts) {
105
+        if (!property_exists($node, 'parts') || null === $node->parts) {
106 106
             return (string) $node->name;
107 107
         }
108 108
         return (string) implode($node->parts);
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
     // do not use isset here, we want to check if property is set
136 136
     if (property_exists($node, 'name') && null === $node->name) {
137
-        return 'anonymous@' . spl_object_hash($node);
137
+        return 'anonymous@'.spl_object_hash($node);
138 138
     }
139 139
 
140 140
     if (isset($node->name)) {
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
     }
157 157
     while (false !== ($file = readdir($dir))) {
158 158
         if (($file != '.') && ($file != '..')) {
159
-            if (is_dir($src . '/' . $file)) {
160
-                recurse_copy($src . '/' . $file, $dst . '/' . $file);
159
+            if (is_dir($src.'/'.$file)) {
160
+                recurse_copy($src.'/'.$file, $dst.'/'.$file);
161 161
             } else {
162
-                copy($src . '/' . $file, $dst . '/' . $file);
162
+                copy($src.'/'.$file, $dst.'/'.$file);
163 163
             }
164 164
         }
165 165
     }
Please login to merge, or discard this patch.
src/Hal/Search/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
     private function matchExpectedName(Metric $metric, $expectedName)
120 120
     {
121
-        return preg_match('@' . $expectedName . '@i', $metric->getName());
121
+        return preg_match('@'.$expectedName.'@i', $metric->getName());
122 122
     }
123 123
 
124 124
     private function matchInstanceOf(Metric $metric, $instanceOf)
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     {
138 138
         foreach ($usesClasses as $expectedClass) {
139 139
             foreach ((array) $metric->get('externals') as $use) {
140
-                if (preg_match('@' . $expectedClass . '@i', $use)) {
140
+                if (preg_match('@'.$expectedClass.'@i', $use)) {
141 141
                     return true;
142 142
                 }
143 143
             }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     private function matchesMetric(Metric $metric, $metricName, $metricValue)
150 150
     {
151 151
         if (!preg_match_all('!^([=><]*)([\d\.]+)!', $metricValue, $matches, PREG_SET_ORDER)) {
152
-            throw new \LogicException('Invalid search expression for key ' . $metricValue);
152
+            throw new \LogicException('Invalid search expression for key '.$metricValue);
153 153
         }
154 154
         list(, $operator, $expected) = $matches[0];
155 155
 
Please login to merge, or discard this patch.
src/Hal/Application/Config/Validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
         $groupsRaw = $config->get('groups');
57 57
 
58
-        $groups = array_map(static function (array $groupRaw) {
58
+        $groups = array_map(static function(array $groupRaw) {
59 59
             return new Group($groupRaw['name'], $groupRaw['match']);
60 60
         }, $groupsRaw);
61 61
         $config->set('groups', $groups);
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         } else {
70 70
             // When PHP is not compiled with the filter extension, we need to do it manually
71 71
             $bool = $config->get('composer');
72
-            if( is_string($bool) ) {
72
+            if (is_string($bool)) {
73 73
                 $bool = strtolower($bool);
74 74
                 $bool = in_array($bool, ['true', '1', 'yes', 'on'], true);
75 75
             }
Please login to merge, or discard this patch.
src/Hal/Application/Config/File/ConfigFileReaderJson.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     private function resolvePath($path)
46 46
     {
47 47
         if (DIRECTORY_SEPARATOR !== $path[0]) {
48
-            $path = dirname($this->filename) . DIRECTORY_SEPARATOR . $path;
48
+            $path = dirname($this->filename).DIRECTORY_SEPARATOR.$path;
49 49
         }
50 50
 
51 51
         return $path;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         if (isset($jsonData['report']) && is_array($jsonData['report'])) {
119 119
             foreach ($jsonData['report'] as $reportType => $path) {
120 120
                 $path = $this->resolvePath($path);
121
-                $config->set('report-' . $reportType, $path);
121
+                $config->set('report-'.$reportType, $path);
122 122
             }
123 123
         }
124 124
     }
Please login to merge, or discard this patch.
src/Hal/Component/Ast/NodeTraverser.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
 namespace Hal\Component\Ast;
11 11
 
12 12
 if (PHP_VERSION_ID >= 80000) {
13
-    class_alias(Php8NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
13
+    class_alias(Php8NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser');
14 14
 }elseif (PHP_VERSION_ID >= 70000) {
15
-    class_alias(Php7NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
15
+    class_alias(Php7NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser');
16 16
 } else {
17
-    class_alias(Php5NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
17
+    class_alias(Php5NodeTraverser::class, __NAMESPACE__.'\\ActualNodeTraverser');
18 18
 }
19 19
 
20 20
 /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 if (PHP_VERSION_ID >= 80000) {
13 13
     class_alias(Php8NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
14
-}elseif (PHP_VERSION_ID >= 70000) {
14
+} elseif (PHP_VERSION_ID >= 70000) {
15 15
     class_alias(Php7NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
16 16
 } else {
17 17
     class_alias(Php5NodeTraverser::class, __NAMESPACE__ . '\\ActualNodeTraverser');
Please login to merge, or discard this patch.