@@ -47,12 +47,12 @@ discard block  | 
                                                    ||
| 47 | 47 |      { | 
                                                        
| 48 | 48 |          if (!is_dir($pathToTestsDirectory)) { | 
                                                        
| 49 | 49 | throw new InvalidArgumentException(  | 
                                                        
| 50 | - '$pathToTestsDirectory "' . $pathToTestsDirectory . '" does not exist"'  | 
                                                        |
| 50 | + '$pathToTestsDirectory "'.$pathToTestsDirectory.'" does not exist"'  | 
                                                        |
| 51 | 51 | );  | 
                                                        
| 52 | 52 | }  | 
                                                        
| 53 | - $this->largePath = $pathToTestsDirectory . '/Large';  | 
                                                        |
| 54 | - $this->mediumPath = $pathToTestsDirectory . '/Medium';  | 
                                                        |
| 55 | - $this->smallPath = $pathToTestsDirectory . '/Small';  | 
                                                        |
| 53 | + $this->largePath = $pathToTestsDirectory.'/Large';  | 
                                                        |
| 54 | + $this->mediumPath = $pathToTestsDirectory.'/Medium';  | 
                                                        |
| 55 | + $this->smallPath = $pathToTestsDirectory.'/Small';  | 
                                                        |
| 56 | 56 | $this->checkLarge();  | 
                                                        
| 57 | 57 | $this->checkMedium();  | 
                                                        
| 58 | 58 | $this->checkSmall();  | 
                                                        
@@ -114,7 +114,7 @@ discard block  | 
                                                    ||
| 114 | 114 |          foreach ($matches['method'] as $key => $method) { | 
                                                        
| 115 | 115 | $docblock = $matches['docblock'][$key];  | 
                                                        
| 116 | 116 | /* Found the annotation - continue */  | 
                                                        
| 117 | -            if (\strpos($docblock, '@' . $annotation) !== false) { | 
                                                        |
| 117 | +            if (\strpos($docblock, '@'.$annotation) !== false) { | 
                                                        |
| 118 | 118 | continue;  | 
                                                        
| 119 | 119 | }  | 
                                                        
| 120 | 120 | /* No @test annotation found & method not beginning test = not a test, so continue */  | 
                                                        
@@ -122,7 +122,7 @@ discard block  | 
                                                    ||
| 122 | 122 | continue;  | 
                                                        
| 123 | 123 | }  | 
                                                        
| 124 | 124 | $this->errors[$fileInfo->getFilename()][] =  | 
                                                        
| 125 | - 'Failed finding @' . $annotation . ' for method: ' . $method;  | 
                                                        |
| 125 | + 'Failed finding @'.$annotation.' for method: '.$method;  | 
                                                        |
| 126 | 126 | }  | 
                                                        
| 127 | 127 | }  | 
                                                        
| 128 | 128 | |
@@ -147,7 +147,7 @@ discard block  | 
                                                    ||
| 147 | 147 | }  | 
                                                        
| 148 | 148 | $docBlock = array_shift($matches['docblock']);  | 
                                                        
| 149 | 149 | |
| 150 | - return strpos($docBlock, '@' . $annotation) !== false;  | 
                                                        |
| 150 | + return strpos($docBlock, '@'.$annotation) !== false;  | 
                                                        |
| 151 | 151 | }  | 
                                                        
| 152 | 152 | |
| 153 | 153 | private function checkMedium(): void  | 
                                                        
@@ -192,14 +192,14 @@  | 
                                                    ||
| 192 | 192 | //$start = microtime(true);  | 
                                                        
| 193 | 193 | //fwrite(STDERR, "\n".'Validating link: '.$href);  | 
                                                        
| 194 | 194 | $context = stream_context_create([  | 
                                                        
| 195 | - 'http' => [  | 
                                                        |
| 196 | - 'method' => 'HEAD',  | 
                                                        |
| 197 | - 'protocol_version' => 1.1,  | 
                                                        |
| 198 | - 'header' => [  | 
                                                        |
| 199 | - 'Connection: close',  | 
                                                        |
| 200 | - ],  | 
                                                        |
| 201 | - ],  | 
                                                        |
| 202 | - ]);  | 
                                                        |
| 195 | + 'http' => [  | 
                                                        |
| 196 | + 'method' => 'HEAD',  | 
                                                        |
| 197 | + 'protocol_version' => 1.1,  | 
                                                        |
| 198 | + 'header' => [  | 
                                                        |
| 199 | + 'Connection: close',  | 
                                                        |
| 200 | + ],  | 
                                                        |
| 201 | + ],  | 
                                                        |
| 202 | + ]);  | 
                                                        |
| 203 | 203 | $result = null;  | 
                                                        
| 204 | 204 |          try { | 
                                                        
| 205 | 205 | $headers = get_headers($href, 0, $context);  | 
                                                        
@@ -39,14 +39,14 @@ discard block  | 
                                                    ||
| 39 | 39 | $files = static::getFiles($projectRootDirectory);  | 
                                                        
| 40 | 40 |          foreach ($files as $file) { | 
                                                        
| 41 | 41 | $relativeFile = str_replace([$projectRootDirectory], [''], $file)[0];  | 
                                                        
| 42 | -            $title        = "\n{$relativeFile}\n" . str_repeat('-', strlen($relativeFile[0])) . "\n"; | 
                                                        |
| 42 | +            $title        = "\n{$relativeFile}\n".str_repeat('-', strlen($relativeFile[0]))."\n"; | 
                                                        |
| 43 | 43 | $errors = [];  | 
                                                        
| 44 | 44 | $links = static::getLinks($file);  | 
                                                        
| 45 | 45 |              foreach ($links as $link) { | 
                                                        
| 46 | 46 | static::checkLink($projectRootDirectory, $link, $file, $errors, $return);  | 
                                                        
| 47 | 47 | }  | 
                                                        
| 48 | 48 |              if ([] !== $errors) { | 
                                                        
| 49 | -                echo $title . implode('', $errors); | 
                                                        |
| 49 | +                echo $title.implode('', $errors); | 
                                                        |
| 50 | 50 | }  | 
                                                        
| 51 | 51 | }  | 
                                                        
| 52 | 52 | |
@@ -72,7 +72,7 @@ discard block  | 
                                                    ||
| 72 | 72 | private static function getDocsFiles(string $projectRootDirectory): array  | 
                                                        
| 73 | 73 |      { | 
                                                        
| 74 | 74 | $files = [];  | 
                                                        
| 75 | - $dir = $projectRootDirectory . '/docs';  | 
                                                        |
| 75 | + $dir = $projectRootDirectory.'/docs';  | 
                                                        |
| 76 | 76 |          if (!is_dir($dir)) { | 
                                                        
| 77 | 77 | return $files;  | 
                                                        
| 78 | 78 | }  | 
                                                        
@@ -97,7 +97,7 @@ discard block  | 
                                                    ||
| 97 | 97 | */  | 
                                                        
| 98 | 98 | private static function getMainReadme(string $projectRootDirectory): string  | 
                                                        
| 99 | 99 |      { | 
                                                        
| 100 | - $path = $projectRootDirectory . '/README.md';  | 
                                                        |
| 100 | + $path = $projectRootDirectory.'/README.md';  | 
                                                        |
| 101 | 101 |          if (!is_file($path)) { | 
                                                        
| 102 | 102 | throw new RuntimeException(  | 
                                                        
| 103 | 103 | "\n\nYou have no README.md file in your project"  | 
                                                        
@@ -157,15 +157,15 @@ discard block  | 
                                                    ||
| 157 | 157 | $start = rtrim($projectRootDirectory, '/');  | 
                                                        
| 158 | 158 |          if ($path[0] !== '/' || strpos($path, './') === 0) { | 
                                                        
| 159 | 159 | $relativeSubdirs = preg_replace(  | 
                                                        
| 160 | - '%^' . $projectRootDirectory . '%',  | 
                                                        |
| 160 | + '%^'.$projectRootDirectory.'%',  | 
                                                        |
| 161 | 161 | '',  | 
                                                        
| 162 | 162 | dirname($file)  | 
                                                        
| 163 | 163 | );  | 
                                                        
| 164 | 164 |              if ($relativeSubdirs !== null) { | 
                                                        
| 165 | - $start .= '/' . rtrim($relativeSubdirs, '/');  | 
                                                        |
| 165 | + $start .= '/'.rtrim($relativeSubdirs, '/');  | 
                                                        |
| 166 | 166 | }  | 
                                                        
| 167 | 167 | }  | 
                                                        
| 168 | - $realpath = realpath($start . '/' . $path);  | 
                                                        |
| 168 | + $realpath = realpath($start.'/'.$path);  | 
                                                        |
| 169 | 169 |          if ($realpath === false) { | 
                                                        
| 170 | 170 |              $errors[] = sprintf("\nBad link for \"%s\" to \"%s\"\n", $link[1], $link[2]); | 
                                                        
| 171 | 171 | $return = 1;  | 
                                                        
@@ -200,11 +200,11 @@ discard block  | 
                                                    ||
| 200 | 200 | ],  | 
                                                        
| 201 | 201 | ],  | 
                                                        
| 202 | 202 | ]);  | 
                                                        
| 203 | - $result = null;  | 
                                                        |
| 203 | + $result = null;  | 
                                                        |
| 204 | 204 |          try { | 
                                                        
| 205 | 205 | $headers = get_headers($href, 0, $context);  | 
                                                        
| 206 | 206 |              if ($headers === false) { | 
                                                        
| 207 | -                throw new RuntimeException('Failed getting headers for href ' . $href); | 
                                                        |
| 207 | +                throw new RuntimeException('Failed getting headers for href '.$href); | 
                                                        |
| 208 | 208 | }  | 
                                                        
| 209 | 209 |              foreach ($headers as $header) { | 
                                                        
| 210 | 210 |                  if (strpos($header, ' 200 ') !== false) { | 
                                                        
@@ -223,7 +223,7 @@ discard block  | 
                                                    ||
| 223 | 223 | $href,  | 
                                                        
| 224 | 224 | var_export($result, true)  | 
                                                        
| 225 | 225 | );  | 
                                                        
| 226 | - $return = 1;  | 
                                                        |
| 226 | + $return = 1;  | 
                                                        |
| 227 | 227 | //$time = round(microtime(true) - $start, 2);  | 
                                                        
| 228 | 228 |          //fwrite(STDERR, "\n".'Failed ('.$time.' seconds): '.$href); | 
                                                        
| 229 | 229 | }  | 
                                                        
@@ -150,7 +150,7 @@  | 
                                                    ||
| 150 | 150 |          $invalidPathMessage = "Namespace root '{$namespaceRoot}'\ncontains a path '{$path}'\nwhich doesn't exist\n"; | 
                                                        
| 151 | 151 |          if (stripos($absPathRoot, 'Magento') !== false) { | 
                                                        
| 152 | 152 | $invalidPathMessage .= 'Magento\'s composer includes this by default, '  | 
                                                        
| 153 | - . 'it should be removed from the psr-4 section';  | 
                                                        |
| 153 | + . 'it should be removed from the psr-4 section';  | 
                                                        |
| 154 | 154 | }  | 
                                                        
| 155 | 155 | $this->missingPaths[$path] = $invalidPathMessage;  | 
                                                        
| 156 | 156 | }  | 
                                                        
@@ -116,7 +116,7 @@ discard block  | 
                                                    ||
| 116 | 116 | $paths = [$paths];  | 
                                                        
| 117 | 117 | }  | 
                                                        
| 118 | 118 |                  foreach ($paths as $path) { | 
                                                        
| 119 | - $absPathRoot = $this->pathToProjectRoot . '/' . $path;  | 
                                                        |
| 119 | + $absPathRoot = $this->pathToProjectRoot.'/'.$path;  | 
                                                        |
| 120 | 120 | $realAbsPathRoot = \realpath($absPathRoot);  | 
                                                        
| 121 | 121 |                      if ($realAbsPathRoot === false) { | 
                                                        
| 122 | 122 | $this->addMissingPathError($path, $namespaceRoot, $absPathRoot);  | 
                                                        
@@ -164,7 +164,7 @@ discard block  | 
                                                    ||
| 164 | 164 | $realPath,  | 
                                                        
| 165 | 165 | RecursiveDirectoryIterator::SKIP_DOTS  | 
                                                        
| 166 | 166 | );  | 
                                                        
| 167 | - $iterator = new RecursiveIteratorIterator(  | 
                                                        |
| 167 | + $iterator = new RecursiveIteratorIterator(  | 
                                                        |
| 168 | 168 | $directoryIterator,  | 
                                                        
| 169 | 169 | RecursiveIteratorIterator::SELF_FIRST  | 
                                                        
| 170 | 170 | );  | 
                                                        
@@ -209,7 +209,7 @@ discard block  | 
                                                    ||
| 209 | 209 |      { | 
                                                        
| 210 | 210 | $contents = \file_get_contents($fileInfo->getPathname());  | 
                                                        
| 211 | 211 |          if ($contents === false) { | 
                                                        
| 212 | -            throw new RuntimeException('Failed getting file contents for ' . $fileInfo->getPathname()); | 
                                                        |
| 212 | +            throw new RuntimeException('Failed getting file contents for '.$fileInfo->getPathname()); | 
                                                        |
| 213 | 213 | }  | 
                                                        
| 214 | 214 |          \preg_match('%namespace\s+?([^;]+)%', $contents, $matches); | 
                                                        
| 215 | 215 |          if ([] === $matches) { | 
                                                        
@@ -234,6 +234,6 @@ discard block  | 
                                                    ||
| 234 | 234 | );  | 
                                                        
| 235 | 235 | }  | 
                                                        
| 236 | 236 | |
| 237 | - return rtrim($namespaceRoot . $relativeNs, '\\');  | 
                                                        |
| 237 | + return rtrim($namespaceRoot.$relativeNs, '\\');  | 
                                                        |
| 238 | 238 | }  | 
                                                        
| 239 | 239 | }  | 
                                                        
@@ -23,14 +23,14 @@  | 
                                                    ||
| 23 | 23 | */  | 
                                                        
| 24 | 24 | public static function getComposerJsonDecoded(string $path = null): array  | 
                                                        
| 25 | 25 |      { | 
                                                        
| 26 | - $path = $path ?? self::getProjectRootDirectory() . '/composer.json';  | 
                                                        |
| 26 | + $path = $path ?? self::getProjectRootDirectory().'/composer.json';  | 
                                                        |
| 27 | 27 | $contents = (string)\file_get_contents($path);  | 
                                                        
| 28 | 28 |          if ($contents === '') { | 
                                                        
| 29 | 29 |              throw new RuntimeException('composer.json is empty'); | 
                                                        
| 30 | 30 | }  | 
                                                        
| 31 | 31 | $decoded = \json_decode($contents, true);  | 
                                                        
| 32 | 32 |          if (\json_last_error() !== JSON_ERROR_NONE) { | 
                                                        
| 33 | -            throw new RuntimeException('Failed loading composer.json: ' . \json_last_error_msg()); | 
                                                        |
| 33 | +            throw new RuntimeException('Failed loading composer.json: '.\json_last_error_msg()); | 
                                                        |
| 34 | 34 | }  | 
                                                        
| 35 | 35 | |
| 36 | 36 | return $decoded;  | 
                                                        
@@ -93,8 +93,8 @@  | 
                                                    ||
| 93 | 93 | )();  | 
                                                        
| 94 | 94 | |
| 95 | 95 | $finder = PhpCsFixer\Finder::create()  | 
                                                        
| 96 | - ->in($projectRoot)  | 
                                                        |
| 97 | -                           ->exclude('var'); | 
                                                        |
| 96 | + ->in($projectRoot)  | 
                                                        |
| 97 | +                            ->exclude('var'); | 
                                                        |
| 98 | 98 | |
| 99 | 99 | return PhpCsFixer\Config::create()  | 
                                                        
| 100 | 100 | ->setRules($rules)  | 
                                                        
@@ -85,7 +85,7 @@  | 
                                                    ||
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | $projectRoot = (  | 
                                                        
| 88 | -function () { | 
                                                        |
| 88 | +function() { | 
                                                        |
| 89 | 89 | $reflection = new ReflectionClass(ClassLoader::class);  | 
                                                        
| 90 | 90 | |
| 91 | 91 | return dirname($reflection->getFileName(), 3);  |