@@ -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 | |
@@ -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 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | private function setSourceAllowedValues(OptionsResolver $optionsResolver) |
| 40 | 40 | { |
| 41 | - $optionsResolver->setAllowedValues(self::NAME, function (array $source) { |
|
| 41 | + $optionsResolver->setAllowedValues(self::NAME, function(array $source) { |
|
| 42 | 42 | foreach ($source as $singleSource) { |
| 43 | 43 | if (!file_exists($singleSource)) { |
| 44 | 44 | throw new SourceNotFoundException(sprintf( |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $optionsResolver->setNormalizer( |
| 55 | 55 | self::NAME, |
| 56 | - function (OptionsResolver $optionsResolver, array $standardNames) { |
|
| 56 | + function(OptionsResolver $optionsResolver, array $standardNames) { |
|
| 57 | 57 | $standardNames = ValueNormalizer::normalizeCommaSeparatedValues($standardNames); |
| 58 | 58 | return $this->standardFinder->getRulesetPathsForStandardNames($standardNames); |
| 59 | 59 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | private function setAllowedValues(OptionsResolver $optionsResolver) |
| 64 | 64 | { |
| 65 | - $optionsResolver->setAllowedValues(self::NAME, function (array $standards) { |
|
| 65 | + $optionsResolver->setAllowedValues(self::NAME, function(array $standards) { |
|
| 66 | 66 | $standards = ValueNormalizer::normalizeCommaSeparatedValues($standards); |
| 67 | 67 | |
| 68 | 68 | $availableStandards = $this->standardFinder->getStandards(); |
@@ -46,14 +46,14 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $parts = explode('\\', $sniffClass); |
| 48 | 48 | |
| 49 | - $standardName = $parts[count($parts)-4]; |
|
| 49 | + $standardName = $parts[count($parts) - 4]; |
|
| 50 | 50 | if (Strings::endsWith($standardName, 'CodingStandard')) { |
| 51 | 51 | $standardName = substr($standardName, 0, -strlen('CodingStandard')); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - $categoryName = $parts[count($parts)-2]; |
|
| 54 | + $categoryName = $parts[count($parts) - 2]; |
|
| 55 | 55 | |
| 56 | - $sniffName = $parts[count($parts)-1]; |
|
| 56 | + $sniffName = $parts[count($parts) - 1]; |
|
| 57 | 57 | $sniffName = substr($sniffName, 0, -strlen('Sniff')); |
| 58 | 58 | |
| 59 | 59 | return $standardName.'.'.$categoryName.'.'.$sniffName; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | throw new SniffClassCouldNotBeFoundException(sprintf( |
| 94 | 94 | 'Sniff class for code "%s" could not be found. We tried:'.PHP_EOL.' - %s ', |
| 95 | 95 | $sniffCode, |
| 96 | - implode(PHP_EOL . ' - ', $guessedClasses) |
|
| 96 | + implode(PHP_EOL.' - ', $guessedClasses) |
|
| 97 | 97 | )); |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | $standardDir = dirname($standardRuleset); |
| 36 | 36 | |
| 37 | 37 | $classLoader->addPsr4( |
| 38 | - $standardNamespace . '\\', |
|
| 39 | - $standardDir . DIRECTORY_SEPARATOR . $standardNamespace |
|
| 38 | + $standardNamespace.'\\', |
|
| 39 | + $standardDir.DIRECTORY_SEPARATOR.$standardNamespace |
|
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | } |