@@ -49,7 +49,7 @@ |
||
49 | 49 | { |
50 | 50 | preg_match("/[ ]function[ ]/", $contents, $matches); |
51 | 51 | if (isset($matches[0])) { |
52 | - $this->score ++; |
|
52 | + $this->score++; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function orderByScoreDesc(): self |
14 | 14 | { |
15 | - return $this->sortByDesc(function ($result) { |
|
15 | + return $this->sortByDesc(function($result) { |
|
16 | 16 | return $result->getScore(); |
17 | 17 | }); |
18 | 18 | } |
@@ -70,7 +70,7 @@ |
||
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 | /** |
@@ -60,7 +60,7 @@ |
||
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]; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function createGitCommitProcess(File $file): ChurnProcess |
27 | 27 | { |
28 | 28 | $process = new Process( |
29 | - 'git -C ' . getcwd() . " log --since=\"" . $this->config->getCommitsSince() . "\" --name-only --pretty=format: " . $file->getFullPath(). " | sort | uniq -c | sort -nr" |
|
29 | + 'git -C '.getcwd()." log --since=\"".$this->config->getCommitsSince()."\" --name-only --pretty=format: ".$file->getFullPath()." | sort | uniq -c | sort -nr" |
|
30 | 30 | ); |
31 | 31 | |
32 | 32 | return new ChurnProcess($file, $process, 'GitCommitProcess'); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function createCyclomaticComplexityProcess(File $file): ChurnProcess |
41 | 41 | { |
42 | - $rootFolder = __DIR__ . '/../../'; |
|
42 | + $rootFolder = __DIR__.'/../../'; |
|
43 | 43 | |
44 | 44 | $process = new Process( |
45 | 45 | "php {$rootFolder}CyclomaticComplexityAssessorRunner {$file->getFullPath()}" |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | public function __construct() |
78 | 78 | { |
79 | 79 | parent::__construct(); |
80 | - $this->config = new Config(Yaml::parse(@file_get_contents(getcwd() . '/churn.yml')) ?? []); |
|
80 | + $this->config = new Config(Yaml::parse(@file_get_contents(getcwd().'/churn.yml')) ?? []); |
|
81 | 81 | $this->fileManager = new FileManager($this->config); |
82 | 82 | $this->processFactory = new ProcessFactory($this->config); |
83 | 83 | $this->resultsParser = new ResultsParser($this->config); |
@@ -166,6 +166,6 @@ discard block |
||
166 | 166 | $table->addRow($result->toArray()); |
167 | 167 | } |
168 | 168 | $table->render(); |
169 | - echo " " . $this->filesCount . " files analysed in {$totalTime} seconds using " . $this->config->getParallelJobs() . " parallel jobs.\n\n"; |
|
169 | + echo " ".$this->filesCount." files analysed in {$totalTime} seconds using ".$this->config->getParallelJobs()." parallel jobs.\n\n"; |
|
170 | 170 | } |
171 | 171 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | ]; |
82 | 82 | $formula = str_replace(array_keys($replacement), $replacement, $this->config->getFormula()); |
83 | 83 | |
84 | - return eval('return ' . $formula . ';'); |
|
84 | + return eval('return '.$formula.';'); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |