Completed
Pull Request — master (#314)
by
unknown
01:54
created
src/Hal/Component/File/Finder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,16 +71,16 @@
 block discarded – undo
71 71
         $files = [];
72 72
 
73 73
         $regexForFilter = !empty($this->excludedDirs)
74
-            ? '((?!' . \implode('|', \array_map('\preg_quote', $this->excludedDirs)) . ').)+'
74
+            ? '((?!'.\implode('|', \array_map('\preg_quote', $this->excludedDirs)).').)+'
75 75
             : '.+';
76 76
 
77 77
         foreach ($paths as $path) {
78 78
             if (\is_dir($path)) {
79
-                $path = \rtrim($path, \DIRECTORY_SEPARATOR) . \DIRECTORY_SEPARATOR;
79
+                $path = \rtrim($path, \DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR;
80 80
                 $directory = new RecursiveDirectoryIterator($path, $this->flags);
81 81
                 $iterator = new RecursiveIteratorIterator($directory);
82 82
 
83
-                $filterRegex = \sprintf('`^%s%s$`', $regexForFilter, '\.(' . \implode('|', $this->extensions) . ')');
83
+                $filterRegex = \sprintf('`^%s%s$`', $regexForFilter, '\.('.\implode('|', $this->extensions).')');
84 84
 
85 85
                 $filteredIterator = new RegexIterator(
86 86
                     $iterator,
Please login to merge, or discard this patch.
src/Hal/Application/Application.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
             }
70 70
 
71 71
             if ($this->config->has('version')) {
72
-                $outputFormat = 'PhpMetrics %s <http://phpmetrics.org>' . \PHP_EOL .
73
-                    'by Jean-François Lépine <https://twitter.com/Halleck45>' . \PHP_EOL;
72
+                $outputFormat = 'PhpMetrics %s <http://phpmetrics.org>'.\PHP_EOL.
73
+                    'by Jean-François Lépine <https://twitter.com/Halleck45>'.\PHP_EOL;
74 74
                 $this->output->writeln(\sprintf($outputFormat, \getVersion()));
75 75
                 exit(0);
76 76
             }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         (new Report\Violations\Xml\Reporter($this->config, $this->output))->generate($metrics);
116 116
 
117 117
         // 5. Enjoy the end.
118
-        $this->output->writeln(\PHP_EOL . 'Done' . \PHP_EOL);
118
+        $this->output->writeln(\PHP_EOL.'Done'.\PHP_EOL);
119 119
     }
120 120
 
121 121
     /**
@@ -125,6 +125,6 @@  discard block
 block discarded – undo
125 125
      */
126 126
     private function outputException(Throwable $e)
127 127
     {
128
-        return $this->output->err(\sprintf(\PHP_EOL .'<error>%s</error>' . \PHP_EOL, $e->getMessage()));
128
+        return $this->output->err(\sprintf(\PHP_EOL.'<error>%s</error>'.\PHP_EOL, $e->getMessage()));
129 129
     }
130 130
 }
Please login to merge, or discard this patch.
src/Hal/Application/Config/File/ConfigFileReaderIni.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function read(Config $config)
33 33
     {
34 34
         if (false === ($options = \parse_ini_file($this->filename))) {
35
-            throw new InvalidArgumentException('Cannot parse configuration file ' . $this->filename . '.');
35
+            throw new InvalidArgumentException('Cannot parse configuration file '.$this->filename.'.');
36 36
         }
37 37
 
38 38
         $config->fromArray($options);
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
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
         $jsonText = \file_get_contents($this->filename);
38 38
 
39 39
         if (false === $jsonText) {
40
-            throw new InvalidArgumentException('Cannot read configuration file ' . $this->filename . '.');
40
+            throw new InvalidArgumentException('Cannot read configuration file '.$this->filename.'.');
41 41
         }
42 42
 
43 43
         $jsonData = \json_decode($jsonText, true);
44 44
 
45 45
         if (false === $jsonData) {
46
-            throw new InvalidArgumentException('Bad json file ' . $this->filename . '.');
46
+            throw new InvalidArgumentException('Bad json file '.$this->filename.'.');
47 47
         }
48 48
 
49 49
         $config->fromArray($this->collapse($jsonData));
Please login to merge, or discard this patch.
src/Hal/Application/Config/File/ConfigFileReaderFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     public static function createFromFileName($filename)
38 38
     {
39 39
         if (!\is_readable($filename)) {
40
-            throw new InvalidArgumentException('Cannot read configuration file ' . $filename . '.');
40
+            throw new InvalidArgumentException('Cannot read configuration file '.$filename.'.');
41 41
         }
42 42
 
43 43
         $ext = static::checkAllowed(\pathinfo($filename, \PATHINFO_EXTENSION));
Please login to merge, or discard this patch.
src/Hal/Metric/Class_/Coupling/ExternalsVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
 
154 154
         // Parse instantiations and static calls.
155 155
         $dependencies = [];
156
-        \iterate_over_node($stmt, function ($node) use (&$dependencies) {
156
+        \iterate_over_node($stmt, function($node) use (&$dependencies) {
157 157
             switch (true) {
158 158
                 case $node instanceof Node\Expr\New_:
159 159
                     // new MyClass
Please login to merge, or discard this patch.
src/Hal/Component/Ast/NodeTraverser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     public function __construct($stopCondition = null)
33 33
     {
34 34
         if (null === $stopCondition) {
35
-            $stopCondition = function (Node $node) {
35
+            $stopCondition = function(Node $node) {
36 36
                 return !($node instanceof ClassLike);
37 37
             };
38 38
         }
Please login to merge, or discard this patch.
src/Hal/Application/Analyze.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $metrics = new Metrics();
82 82
 
83 83
         // Traverse all files.
84
-        $whenToStop = function () {
84
+        $whenToStop = function() {
85 85
             return true;
86 86
         };
87 87
 
Please login to merge, or discard this patch.