@@ -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 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function render(OutputInterface $output, array $results): void |
19 | 19 | { |
20 | - $data = \array_map(static function (array $result): array { |
|
20 | + $data = \array_map(static function(array $result): array { |
|
21 | 21 | return [ |
22 | 22 | 'file' => $result[0], |
23 | 23 | 'commits' => $result[1], |
@@ -90,10 +90,10 @@ |
||
90 | 90 | { |
91 | 91 | $process = $processFactory->createChangesCountProcess($file); |
92 | 92 | $process->start(); |
93 | - $pool['CountChanges:' . $process->getFilename()] = $process; |
|
93 | + $pool['CountChanges:'.$process->getFilename()] = $process; |
|
94 | 94 | $process = $processFactory->createCyclomaticComplexityProcess($file); |
95 | 95 | $process->start(); |
96 | - $pool['Complexity:' . $process->getFilename()] = $process; |
|
96 | + $pool['Complexity:'.$process->getFilename()] = $process; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $confPath = (string) $input->getOption('configuration'); |
111 | 111 | |
112 | 112 | if (!\is_readable($confPath)) { |
113 | - throw new InvalidArgumentException('The configuration file can not be read at ' . $confPath); |
|
113 | + throw new InvalidArgumentException('The configuration file can not be read at '.$confPath); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | $content = (string) \file_get_contents($confPath); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | |
141 | 141 | throw new InvalidArgumentException( |
142 | - 'Provide the directories you want to scan as arguments, ' . |
|
142 | + 'Provide the directories you want to scan as arguments, '. |
|
143 | 143 | 'or configure them under "directoriesToScan" in your churn.yml file.' |
144 | 144 | ); |
145 | 145 | } |
@@ -79,12 +79,12 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | if ('none' === $vcs) { |
82 | - return static function (File $file): ChangesCountInterface { |
|
82 | + return static function(File $file): ChangesCountInterface { |
|
83 | 83 | return new NoVcsChangesCountProcess($file); |
84 | 84 | }; |
85 | 85 | } |
86 | 86 | |
87 | - throw new InvalidArgumentException('Unsupported VCS: ' . $vcs); |
|
87 | + throw new InvalidArgumentException('Unsupported VCS: '.$vcs); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | private function getGitChangesCountProcessBuilder(string $commitsSince): Closure |
94 | 94 | { |
95 | - return static function (File $file) use ($commitsSince): ChangesCountInterface { |
|
95 | + return static function(File $file) use ($commitsSince): ChangesCountInterface { |
|
96 | 96 | return new GitChangesCountProcess($file, $commitsSince); |
97 | 97 | }; |
98 | 98 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | { |
105 | 105 | $date = \date('Y-m-d', \strtotime($commitsSince)); |
106 | 106 | |
107 | - return static function (File $file) use ($date): ChangesCountInterface { |
|
107 | + return static function(File $file) use ($date): ChangesCountInterface { |
|
108 | 108 | return new MercurialChangesCountProcess($file, $date); |
109 | 109 | }; |
110 | 110 | } |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function getCyclomaticComplexityProcessBuilder(): Closure |
116 | 116 | { |
117 | - $phpExecutable = (string)(new PhpExecutableFinder())->find(); |
|
117 | + $phpExecutable = (string) (new PhpExecutableFinder())->find(); |
|
118 | 118 | $command = \array_merge([$phpExecutable], $this->getAssessorArguments()); |
119 | 119 | |
120 | - return static function (File $file) use ($command): CyclomaticComplexityInterface { |
|
120 | + return static function(File $file) use ($command): CyclomaticComplexityInterface { |
|
121 | 121 | $command[] = $file->getFullPath(); |
122 | 122 | $process = new Process($command); |
123 | 123 | |
@@ -132,6 +132,6 @@ discard block |
||
132 | 132 | return [Phar::running(false), 'assess-complexity']; |
133 | 133 | } |
134 | 134 | |
135 | - return [__DIR__ . '/../../bin/CyclomaticComplexityAssessorRunner']; |
|
135 | + return [__DIR__.'/../../bin/CyclomaticComplexityAssessorRunner']; |
|
136 | 136 | } |
137 | 137 | } |