@@ -293,7 +293,7 @@ |
||
293 | 293 | /** |
294 | 294 | * Get argument value from user informed arguments. |
295 | 295 | * @param string $name argument name. |
296 | - * @return Mixed argument value. |
|
296 | + * @return string argument value. |
|
297 | 297 | */ |
298 | 298 | protected function getArgumentValue($name) |
299 | 299 | { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | if (!isset($formatClasses[$format])) { |
126 | 126 | throw new UnexpectedValueException( |
127 | - 'Invalid format: "' . $format . '"' |
|
127 | + 'Invalid format: "'.$format.'"' |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | if (0 === strpos($path, DIRECTORY_SEPARATOR)) { |
218 | 218 | continue; |
219 | 219 | } |
220 | - $path = $this->getWorkingDirectory() . DIRECTORY_SEPARATOR . $path; |
|
220 | + $path = $this->getWorkingDirectory().DIRECTORY_SEPARATOR.$path; |
|
221 | 221 | } |
222 | 222 | $this->analysedPaths = $paths; |
223 | 223 | } |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | public function getDescription() |
257 | 257 | { |
258 | - return 'PHP Hound ' . Analyser::VERSION; |
|
258 | + return 'PHP Hound '.Analyser::VERSION; |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'historyData' => array_values($chartData['historyData']), |
65 | 65 | ] |
66 | 66 | ); |
67 | - $fileName = $this->getOutputDirectory() . '/index.html'; |
|
67 | + $fileName = $this->getOutputDirectory().'/index.html'; |
|
68 | 68 | $file = new SplFileObject($fileName, 'w'); |
69 | 69 | $file->fwrite($indexHtml); |
70 | 70 | } |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | 'backButton' => true, |
88 | 88 | ] |
89 | 89 | ); |
90 | - $htmlFileName = $this->getOutputDirectory() . '/' |
|
91 | - . str_replace(DIRECTORY_SEPARATOR, '_', $phpFilePath) . '.html'; |
|
90 | + $htmlFileName = $this->getOutputDirectory().'/' |
|
91 | + . str_replace(DIRECTORY_SEPARATOR, '_', $phpFilePath).'.html'; |
|
92 | 92 | |
93 | 93 | $file = new SplFileObject($htmlFileName, 'w'); |
94 | 94 | $file->fwrite($fileHtml); |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | 'layout', |
110 | 110 | [ |
111 | 111 | 'content' => $content, |
112 | - 'phpHoundVersion' => 'PHP Hound ' . Analyser::VERSION, |
|
113 | - 'phpVersion' => 'PHP ' . phpversion(), |
|
112 | + 'phpHoundVersion' => 'PHP Hound '.Analyser::VERSION, |
|
113 | + 'phpVersion' => 'PHP '.phpversion(), |
|
114 | 114 | 'generationTime' => $date->format('r'), |
115 | 115 | 'backButton' => !empty($data['backButton']), |
116 | 116 | ] |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | protected function getPlatesEngine() |
125 | 125 | { |
126 | 126 | if (null === $this->platesEngine) { |
127 | - $this->platesEngine = new Engine(__DIR__ . '/../templates'); |
|
127 | + $this->platesEngine = new Engine(__DIR__.'/../templates'); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $this->platesEngine; |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | protected function getOutputDirectory() |
138 | 138 | { |
139 | - $directory = $this->outputDirectory . '/phphound'; |
|
139 | + $directory = $this->outputDirectory.'/phphound'; |
|
140 | 140 | |
141 | 141 | if (!file_exists($directory)) { |
142 | 142 | mkdir($directory); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $files = []; |
68 | 68 | foreach ($this->getDiffsWithAddedCode() as $fileDiff) { |
69 | - $files[] = $this->root . DIRECTORY_SEPARATOR . substr($fileDiff->getTo(), 2); |
|
69 | + $files[] = $this->root.DIRECTORY_SEPARATOR.substr($fileDiff->getTo(), 2); |
|
70 | 70 | } |
71 | 71 | return $files; |
72 | 72 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $resultFilter = []; |
81 | 81 | foreach ($this->getDiffsWithAddedCode() as $fileDiff) { |
82 | - $file = $this->root . DIRECTORY_SEPARATOR . substr($fileDiff->getTo(), 2); |
|
82 | + $file = $this->root.DIRECTORY_SEPARATOR.substr($fileDiff->getTo(), 2); |
|
83 | 83 | $lines = []; |
84 | 84 | foreach ($fileDiff->getChunks() as $chunkDiff) { |
85 | 85 | $counter = -1; |
@@ -43,12 +43,12 @@ discard block |
||
43 | 43 | $paddedLineNumber = str_pad($lineNumber, $paddingLength, '0', STR_PAD_LEFT); |
44 | 44 | $hasIssues = isset($this->linesWithIssues[$lineNumber]); |
45 | 45 | $lineCssClass = $hasIssues ? 'has-issues' : 'no-issues'; |
46 | - $lineId = 'line' . $lineNumber; |
|
46 | + $lineId = 'line'.$lineNumber; |
|
47 | 47 | |
48 | - $html .= '<div class="' . $lineCssClass . '" id="' . $lineId . '">'; |
|
49 | - $html .= '<span class="line-number">' . $paddedLineNumber . '</span>'; |
|
48 | + $html .= '<div class="'.$lineCssClass.'" id="'.$lineId.'">'; |
|
49 | + $html .= '<span class="line-number">'.$paddedLineNumber.'</span>'; |
|
50 | 50 | $html .= $this->getIssuesTooltip($lineNumber); |
51 | - $html .= $line . '</div>'; |
|
51 | + $html .= $line.'</div>'; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | $html .= "</span></code>"; |
@@ -87,11 +87,11 @@ discard block |
||
87 | 87 | if (!isset($this->linesWithIssues[$lineNumber])) { |
88 | 88 | return ''; |
89 | 89 | } |
90 | - $html = '<div class="mdl-tooltip mdl-tooltip--large" for="line' . $lineNumber . '">'; |
|
90 | + $html = '<div class="mdl-tooltip mdl-tooltip--large" for="line'.$lineNumber.'">'; |
|
91 | 91 | $html .= '<ul>'; |
92 | 92 | |
93 | 93 | foreach ($this->linesWithIssues[$lineNumber] as $issue) { |
94 | - $html .= '<li>' . trim($issue['message']) . '</ul>'; |
|
94 | + $html .= '<li>'.trim($issue['message']).'</ul>'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | $html .= '</ul></div>'; |
@@ -125,6 +125,6 @@ |
||
125 | 125 | */ |
126 | 126 | protected function getHistoryFilePath() |
127 | 127 | { |
128 | - return $this->outputDirectory . '/history.json'; |
|
128 | + return $this->outputDirectory.'/history.json'; |
|
129 | 129 | } |
130 | 130 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $writer = new Writer; |
25 | 25 | $writer->openMemory(); |
26 | 26 | $writer->write($this->getSabreXmlArrayFor($result)); |
27 | - return '<?xml version="1.0" encoding="UTF-8"?>' . $writer->outputMemory(); |
|
27 | + return '<?xml version="1.0" encoding="UTF-8"?>'.$writer->outputMemory(); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -19,14 +19,14 @@ |
||
19 | 19 | $issues = '(1 issue)'; |
20 | 20 | |
21 | 21 | if ($issuesCount > 1) { |
22 | - $issues = '(' . $issuesCount . ' issues)'; |
|
22 | + $issues = '('.$issuesCount.' issues)'; |
|
23 | 23 | } |
24 | 24 | |
25 | - $this->cli->yellowFlank($fileName . ' ' . $issues, '=', 2); |
|
25 | + $this->cli->yellowFlank($fileName.' '.$issues, '=', 2); |
|
26 | 26 | |
27 | 27 | foreach ($lines as $line => $issues) { |
28 | 28 | foreach ($issues as $issue) { |
29 | - $this->cli->cyan()->inline($line . ': '); |
|
29 | + $this->cli->cyan()->inline($line.': '); |
|
30 | 30 | $this->cli->inline(trim($issue['message'])); |
31 | 31 | $this->cli->br(); |
32 | 32 | } |
@@ -23,13 +23,13 @@ |
||
23 | 23 | if (!empty($message['ignoredPaths'])) { |
24 | 24 | $this->cli->out('(ignored paths:)'); |
25 | 25 | foreach ($message['ignoredPaths'] as $ignoredPath) { |
26 | - $this->cli->red("\t" . $ignoredPath); |
|
26 | + $this->cli->red("\t".$ignoredPath); |
|
27 | 27 | } |
28 | 28 | } |
29 | 29 | break; |
30 | 30 | |
31 | 31 | case Analyser::EVENT_STARTING_TOOL: |
32 | - $this->cli->inline('Running ' . $message['description'] . '... '); |
|
32 | + $this->cli->inline('Running '.$message['description'].'... '); |
|
33 | 33 | break; |
34 | 34 | |
35 | 35 | case Analyser::EVENT_FINISHED_TOOL: |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function getIgnoredArgument() |
26 | 26 | { |
27 | 27 | if (!empty($this->ignoredPaths)) { |
28 | - return '--ignore=' . implode(',', $this->ignoredPaths) . ' '; |
|
28 | + return '--ignore='.implode(',', $this->ignoredPaths).' '; |
|
29 | 29 | } |
30 | 30 | return ''; |
31 | 31 | } |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function getCommand($targetPaths) |
37 | 37 | { |
38 | - return $this->binariesPath . 'phpcs -p --standard=PSR2 --report=xml ' |
|
39 | - . $this->getIgnoredArgument() . '--report-file="' |
|
40 | - . $this->temporaryFilePath . '" ' . implode(' ', $targetPaths); |
|
38 | + return $this->binariesPath.'phpcs -p --standard=PSR2 --report=xml ' |
|
39 | + . $this->getIgnoredArgument().'--report-file="' |
|
40 | + . $this->temporaryFilePath.'" '.implode(' ', $targetPaths); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |