Completed
Pull Request — master (#177)
by Bill
01:34
created
src/Processes/ChurnProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     public function getKey(): string
72 72
     {
73
-        return $this->getType() . $this->file->getFullPath();
73
+        return $this->getType().$this->file->getFullPath();
74 74
     }
75 75
 
76 76
     /**
Please login to merge, or discard this patch.
src/Results/ResultsParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     {
61 61
         $output = $process->getOutput();
62 62
         preg_match("/([0-9]{1,})/", $output, $matches);
63
-        if (! isset($matches[1])) {
63
+        if (!isset($matches[1])) {
64 64
             return 0;
65 65
         }
66 66
         return (integer) $matches[1];
Please login to merge, or discard this patch.
src/Managers/FileManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
     {
54 54
         $directoryIterator = new RecursiveDirectoryIterator($path);
55 55
         foreach (new RecursiveIteratorIterator($directoryIterator) as $file) {
56
-            if (! in_array($file->getExtension(), $this->fileExtensions)) {
56
+            if (!in_array($file->getExtension(), $this->fileExtensions)) {
57 57
                 continue;
58 58
             }
59 59
 
Please login to merge, or discard this patch.
src/Commands/ChurnCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
         }
212 212
 
213 213
         throw new InvalidArgumentException(
214
-            'Provide the directories you want to scan as arguments, ' .
214
+            'Provide the directories you want to scan as arguments, '.
215 215
             'or configure them under "directoriesToScan" in your churn.yml file.'
216 216
         );
217 217
     }
Please login to merge, or discard this patch.
bin/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (is_file($autoload = __DIR__ . '/../vendor/autoload.php')) {
3
+if (is_file($autoload = __DIR__.'/../vendor/autoload.php')) {
4 4
     require_once($autoload);
5
-} elseif (is_file($autoload = __DIR__ . '/../../../autoload.php')) {
5
+} elseif (is_file($autoload = __DIR__.'/../../../autoload.php')) {
6 6
     require_once($autoload);
7 7
 } else {
8 8
     fwrite(STDERR,
Please login to merge, or discard this patch.
src/Results/ResultCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function orderByScoreDesc(): self
14 14
     {
15
-        return $this->sortByDesc(function (Result $result) {
15
+        return $this->sortByDesc(function(Result $result) {
16 16
             return $result->getScore($this->maxCommits(), $this->maxComplexity());
17 17
         });
18 18
     }
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function whereScoreAbove(float $score)
26 26
     {
27
-        return $this->filter(function (Result $result) use ($score) {
27
+        return $this->filter(function(Result $result) use ($score) {
28 28
             return $result->getScore($this->maxCommits(), $this->maxComplexity()) >= $score;
29 29
         });
30 30
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function maxCommits(): int
37 37
     {
38
-        return $this->max(function (Result $result) {
38
+        return $this->max(function(Result $result) {
39 39
             return $result->getCommits();
40 40
         });
41 41
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function maxComplexity(): int
48 48
     {
49
-        return $this->max(function (Result $result) {
49
+        return $this->max(function(Result $result) {
50 50
             return $result->getComplexity();
51 51
         });
52 52
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function toArray(): array
60 60
     {
61 61
         return array_values(array_map(
62
-            function (Result $result) {
62
+            function(Result $result) {
63 63
                 return array_merge(
64 64
                     $result->toArray(),
65 65
                     [$result->getScore($this->maxCommits(), $this->maxComplexity())]
Please login to merge, or discard this patch.
src/Renderers/Results/JsonResultsRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function render(OutputInterface $output, ResultCollection $results)
18 18
     {
19
-        $data = array_map(function (array $result) {
19
+        $data = array_map(function(array $result) {
20 20
             return [
21 21
                 'file' => $result[0],
22 22
                 'commits' => $result[1],
Please login to merge, or discard this patch.
src/Factories/ProcessFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
     public function createGitCommitProcess(File $file): ChurnProcess
32 32
     {
33 33
         $process = new Process(
34
-            'git -C ' . escapeshellarg(getcwd()) . ' log --since=' .
35
-            escapeshellarg($this->commitsSince) . ' --name-only --pretty=format: ' .
36
-            escapeshellarg($file->getFullPath()) . ' | sort | uniq -c | sort -nr'
34
+            'git -C '.escapeshellarg(getcwd()).' log --since='.
35
+            escapeshellarg($this->commitsSince).' --name-only --pretty=format: '.
36
+            escapeshellarg($file->getFullPath()).' | sort | uniq -c | sort -nr'
37 37
         );
38 38
 
39 39
         return new ChurnProcess($file, $process, 'GitCommitProcess');
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function createCyclomaticComplexityProcess(File $file): ChurnProcess
48 48
     {
49
-        $rootFolder = __DIR__ . '/../../bin/';
49
+        $rootFolder = __DIR__.'/../../bin/';
50 50
 
51 51
         $process = new Process(
52
-            'php ' . escapeshellarg($rootFolder . 'CyclomaticComplexityAssessorRunner') .
53
-            ' ' . escapeshellarg($file->getFullPath())
52
+            'php '.escapeshellarg($rootFolder.'CyclomaticComplexityAssessorRunner').
53
+            ' '.escapeshellarg($file->getFullPath())
54 54
         );
55 55
 
56 56
         return new ChurnProcess($file, $process, 'CyclomaticComplexityProcess');
Please login to merge, or discard this patch.