@@ -54,7 +54,7 @@ |
||
54 | 54 | public function writeErrorReports(array $errorReports) |
55 | 55 | { |
56 | 56 | foreach ($errorReports as $file => $errors) { |
57 | - $this->symfonyStyle->section('FILE: ' . $file); |
|
57 | + $this->symfonyStyle->section('FILE: '.$file); |
|
58 | 58 | |
59 | 59 | $tableRows = $this->formatErrorsToTableRows($errors); |
60 | 60 | $this->symfonyStyle->table(['Line', 'Error', 'Sniff Code', 'Fixable'], $tableRows); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | private function loadServicesFromConfig() |
38 | 38 | { |
39 | - $config = $this->loadFromFile(__DIR__ . '/../config/services.neon'); |
|
39 | + $config = $this->loadFromFile(__DIR__.'/../config/services.neon'); |
|
40 | 40 | $this->compiler->parseServices($this->getContainerBuilder(), $config); |
41 | 41 | } |
42 | 42 |
@@ -19,14 +19,14 @@ |
||
19 | 19 | $configurator = new Configurator(); |
20 | 20 | $configurator->setDebugMode(false); |
21 | 21 | $configurator->setTempDirectory($this->createAndReturnTempDir()); |
22 | - $configurator->addConfig(__DIR__ . '/../config/config.neon'); |
|
22 | + $configurator->addConfig(__DIR__.'/../config/config.neon'); |
|
23 | 23 | |
24 | 24 | return $configurator->createContainer(); |
25 | 25 | } |
26 | 26 | |
27 | 27 | private function createAndReturnTempDir() : string |
28 | 28 | { |
29 | - $tempDir = sys_get_temp_dir() . '/php7_codesniffer'; |
|
29 | + $tempDir = sys_get_temp_dir().'/php7_codesniffer'; |
|
30 | 30 | FileSystem::delete($tempDir); |
31 | 31 | FileSystem::createDir($tempDir); |
32 | 32 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | foreach (explode(',', $value) as $val) { |
130 | 130 | $v = ''; |
131 | 131 | |
132 | - list($k,$v) = explode('=>', $val.'=>'); |
|
132 | + list($k, $v) = explode('=>', $val.'=>'); |
|
133 | 133 | if ($v !== '') { |
134 | 134 | $values[$k] = $v; |
135 | 135 | } else { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * {@inheritdoc} |
79 | 79 | */ |
80 | - public function addFixableError($error, $stackPtr, $code, $data=[], $severity=0) |
|
80 | + public function addFixableError($error, $stackPtr, $code, $data = [], $severity = 0) |
|
81 | 81 | { |
82 | 82 | $this->addError($error, $stackPtr, $code, $data, $severity, true); |
83 | 83 | return $this->isFixer; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $code, |
95 | 95 | $data, |
96 | 96 | $severity, |
97 | - $isFixable=false |
|
97 | + $isFixable = false |
|
98 | 98 | ) : bool { |
99 | 99 | if (!$error) { // skip warnings |
100 | 100 | return false; |
@@ -161,7 +161,7 @@ |
||
161 | 161 | return true; |
162 | 162 | } |
163 | 163 | |
164 | - public function substrToken(int $stackPtr, int $start, int $length=null) : bool |
|
164 | + public function substrToken(int $stackPtr, int $start, int $length = null) : bool |
|
165 | 165 | { |
166 | 166 | $current = $this->getTokenContent($stackPtr); |
167 | 167 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | { |
57 | 57 | $this->addListener( |
58 | 58 | $token, |
59 | - function (CheckFileTokenEvent $checkFileToken) use ($sniffObject) { |
|
59 | + function(CheckFileTokenEvent $checkFileToken) use ($sniffObject) { |
|
60 | 60 | $sniffObject->process( |
61 | 61 | $checkFileToken->getFile(), |
62 | 62 | $checkFileToken->getStackPointer() |
@@ -18,7 +18,7 @@ |
||
18 | 18 | continue; |
19 | 19 | } |
20 | 20 | |
21 | - usort($errorMessagesForFile, function ($first, $second) { |
|
21 | + usort($errorMessagesForFile, function($first, $second) { |
|
22 | 22 | return ($first['line'] > $second['line']); |
23 | 23 | }); |
24 | 24 |
@@ -91,8 +91,8 @@ |
||
91 | 91 | string $message, |
92 | 92 | int $line, |
93 | 93 | string $sniffCode, |
94 | - array $data=[], |
|
95 | - bool $isFixable=false |
|
94 | + array $data = [], |
|
95 | + bool $isFixable = false |
|
96 | 96 | ) { |
97 | 97 | $this->errorCount++; |
98 | 98 |