@@ -3,9 +3,9 @@ |
||
3 | 3 | error_reporting(E_ALL); |
4 | 4 | ini_set('display_errors', 'stderr'); |
5 | 5 | |
6 | -if (is_file($autoload = __DIR__ . '/../vendor/autoload.php')) { |
|
6 | +if (is_file($autoload = __DIR__.'/../vendor/autoload.php')) { |
|
7 | 7 | require_once($autoload); |
8 | -} elseif (is_file($autoload = __DIR__ . '/../../../autoload.php')) { |
|
8 | +} elseif (is_file($autoload = __DIR__.'/../../../autoload.php')) { |
|
9 | 9 | require_once($autoload); |
10 | 10 | } else { |
11 | 11 | fwrite(STDERR, |
@@ -35,7 +35,7 @@ |
||
35 | 35 | public function __construct(array $fileExtensions, array $filesToIgnore) |
36 | 36 | { |
37 | 37 | $this->fileExtensions = $fileExtensions; |
38 | - $this->filters = \array_map(function (string $fileToIgnore): string { |
|
38 | + $this->filters = \array_map(function(string $fileToIgnore): string { |
|
39 | 39 | return $this->patternToRegex($fileToIgnore); |
40 | 40 | }, $filesToIgnore); |
41 | 41 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $output->writeln($this->getHeader()); |
21 | 21 | |
22 | 22 | foreach ($results as $result) { |
23 | - $output->writeln(\implode(';', ['"' . $result[0] . '"', $result[1], $result[2], $result[3]])); |
|
23 | + $output->writeln(\implode(';', ['"'.$result[0].'"', $result[1], $result[2], $result[3]])); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | case 'none': |
37 | 37 | return $this->getNoVcsChangesCountProcessBuilder(); |
38 | 38 | default: |
39 | - throw new InvalidArgumentException('Unsupported VCS: ' . $vcs); |
|
39 | + throw new InvalidArgumentException('Unsupported VCS: '.$vcs); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | private function getGitChangesCountProcessBuilder(string $commitsSince): Closure |
47 | 47 | { |
48 | - return static function (File $file) use ($commitsSince): ChangesCountInterface { |
|
48 | + return static function(File $file) use ($commitsSince): ChangesCountInterface { |
|
49 | 49 | return new GitChangesCountProcess($file, $commitsSince); |
50 | 50 | }; |
51 | 51 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | (new DateTime('tomorrow'))->format('Y-m-d') |
62 | 62 | ); |
63 | 63 | |
64 | - return static function (File $file) use ($dateRange): ChangesCountInterface { |
|
64 | + return static function(File $file) use ($dateRange): ChangesCountInterface { |
|
65 | 65 | return new SubversionChangesCountProcess($file, $dateRange); |
66 | 66 | }; |
67 | 67 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | { |
74 | 74 | $date = \date('Y-m-d', \strtotime($commitsSince)); |
75 | 75 | |
76 | - return static function (File $file) use ($date): ChangesCountInterface { |
|
76 | + return static function(File $file) use ($date): ChangesCountInterface { |
|
77 | 77 | return new MercurialChangesCountProcess($file, $date); |
78 | 78 | }; |
79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | $date = \date('Y-m-d', \strtotime($commitsSince)); |
87 | 87 | |
88 | - return static function (File $file) use ($date): ChangesCountInterface { |
|
88 | + return static function(File $file) use ($date): ChangesCountInterface { |
|
89 | 89 | return new FossilChangesCountProcess($file, $date); |
90 | 90 | }; |
91 | 91 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | private function getNoVcsChangesCountProcessBuilder(): Closure |
97 | 97 | { |
98 | - return static function (File $file): ChangesCountInterface { |
|
98 | + return static function(File $file): ChangesCountInterface { |
|
99 | 99 | return new NoVcsChangesCountProcess($file); |
100 | 100 | }; |
101 | 101 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $originalConfPath = $confPath; |
21 | 21 | |
22 | 22 | if (\is_dir($confPath)) { |
23 | - $confPath = \rtrim($confPath, '/\\') . '/churn.yml'; |
|
23 | + $confPath = \rtrim($confPath, '/\\').'/churn.yml'; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | if (\is_readable($confPath)) { |
@@ -33,6 +33,6 @@ discard block |
||
33 | 33 | return Config::createFromDefaultValues(); |
34 | 34 | } |
35 | 35 | |
36 | - throw new InvalidArgumentException('The configuration file can not be read at ' . $originalConfPath); |
|
36 | + throw new InvalidArgumentException('The configuration file can not be read at '.$originalConfPath); |
|
37 | 37 | } |
38 | 38 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return (new Filesystem())->isAbsolutePath($path) |
21 | 21 | ? $path |
22 | - : $basePath . '/' . $path; |
|
22 | + : $basePath.'/'.$path; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | private function getCyclomaticComplexityProcessBuilder(): Closure |
76 | 76 | { |
77 | - $phpExecutable = (string)(new PhpExecutableFinder())->find(); |
|
77 | + $phpExecutable = (string) (new PhpExecutableFinder())->find(); |
|
78 | 78 | $command = \array_merge([$phpExecutable], $this->getAssessorArguments()); |
79 | 79 | |
80 | - return static function (File $file) use ($command): CyclomaticComplexityInterface { |
|
80 | + return static function(File $file) use ($command): CyclomaticComplexityInterface { |
|
81 | 81 | $command[] = $file->getFullPath(); |
82 | 82 | $process = new Process($command); |
83 | 83 | |
@@ -92,6 +92,6 @@ discard block |
||
92 | 92 | return [Phar::running(false), 'assess-complexity']; |
93 | 93 | } |
94 | 94 | |
95 | - return [__DIR__ . '/../../bin/CyclomaticComplexityAssessorRunner']; |
|
95 | + return [__DIR__.'/../../bin/CyclomaticComplexityAssessorRunner']; |
|
96 | 96 | } |
97 | 97 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | { |
89 | 89 | foreach ($processFactory->createProcesses($file) as $i => $process) { |
90 | 90 | $process->start(); |
91 | - $pool["$i:" . $file->getDisplayPath()] = $process; |
|
91 | + $pool["$i:".$file->getDisplayPath()] = $process; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | continue; |
50 | 50 | } |
51 | 51 | |
52 | - $this->subscribers[$eventClass][] = static function (Event $event) use ($subscriber, $method): void { |
|
52 | + $this->subscribers[$eventClass][] = static function(Event $event) use ($subscriber, $method): void { |
|
53 | 53 | $subscriber->$method($event); |
54 | 54 | }; |
55 | 55 | } |