@@ -1,8 +1,8 @@ |
||
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, |
@@ -56,8 +56,8 @@ |
||
56 | 56 | private function getProcessResults(int $numberOfParallelJobs) |
57 | 57 | { |
58 | 58 | for ($index = $this->runningProcesses->count(); |
59 | - $this->filesCollection->hasFiles() > 0 && $index < $numberOfParallelJobs; |
|
60 | - $index++) { |
|
59 | + $this->filesCollection->hasFiles() > 0 && $index < $numberOfParallelJobs; |
|
60 | + $index++) { |
|
61 | 61 | $file = $this->filesCollection->getNextFile(); |
62 | 62 | |
63 | 63 | $process = $this->processFactory->createGitCommitProcess($file); |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Managers; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Configuration; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Managers; |
4 | 4 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $directoryIterator = new RecursiveDirectoryIterator($path); |
67 | 67 | foreach (new RecursiveIteratorIterator($directoryIterator) as $file) { |
68 | - if (! in_array($file->getExtension(), $this->fileExtensions)) { |
|
68 | + if (!in_array($file->getExtension(), $this->fileExtensions)) { |
|
69 | 69 | continue; |
70 | 70 | } |
71 | 71 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | |
4 | 4 | namespace Churn\Results; |
@@ -60,7 +60,7 @@ discard block |
||
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]; |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Results; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Results; |
4 | 4 | |
@@ -12,7 +12,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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())] |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Commands; |
4 | 4 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | throw new InvalidArgumentException( |
121 | - 'Provide the directories you want to scan as arguments, ' . |
|
121 | + 'Provide the directories you want to scan as arguments, '. |
|
122 | 122 | 'or configure them under "directoriesToScan" in your churn.yml file.' |
123 | 123 | ); |
124 | 124 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Churn\Values; |
4 | 4 |