@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | private static function getMainReadme(string $projectRootDirectory): string |
30 | 30 | { |
31 | - $path = $projectRootDirectory . '/README.md'; |
|
31 | + $path = $projectRootDirectory.'/README.md'; |
|
32 | 32 | if (!is_file($path)) { |
33 | 33 | throw new \RuntimeException( |
34 | 34 | "\n\nYou have no README.md file in your project" |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | private static function getDocsFiles(string $projectRootDirectory): array |
49 | 49 | { |
50 | 50 | $files = []; |
51 | - $dir = $projectRootDirectory . '/docs'; |
|
51 | + $dir = $projectRootDirectory.'/docs'; |
|
52 | 52 | if (!is_dir($dir)) { |
53 | 53 | return $files; |
54 | 54 | } |
@@ -120,13 +120,13 @@ discard block |
||
120 | 120 | $start = \rtrim($projectRootDirectory, '/'); |
121 | 121 | if ($path[0] !== '/' || 0 === \strpos($path, './')) { |
122 | 122 | $relativeSubdirs = \preg_replace( |
123 | - '%^' . $projectRootDirectory . '%', |
|
123 | + '%^'.$projectRootDirectory.'%', |
|
124 | 124 | '', |
125 | 125 | \dirname($file) |
126 | 126 | ); |
127 | - $start .= '/' . \rtrim($relativeSubdirs, '/'); |
|
127 | + $start .= '/'.\rtrim($relativeSubdirs, '/'); |
|
128 | 128 | } |
129 | - $realpath = \realpath($start . '/' . $path); |
|
129 | + $realpath = \realpath($start.'/'.$path); |
|
130 | 130 | if (false === $realpath) { |
131 | 131 | $errors[] = \sprintf("\nBad link for \"%s\" to \"%s\"\n", $link[1], $link[2]); |
132 | 132 | $return = 1; |
@@ -148,14 +148,14 @@ discard block |
||
148 | 148 | $files = static::getFiles($projectRootDirectory); |
149 | 149 | foreach ($files as $file) { |
150 | 150 | $relativeFile = str_replace($projectRootDirectory, '', $file); |
151 | - $title = "\n$relativeFile\n" . str_repeat('-', strlen($relativeFile)) . "\n"; |
|
151 | + $title = "\n$relativeFile\n".str_repeat('-', strlen($relativeFile))."\n"; |
|
152 | 152 | $errors = []; |
153 | 153 | $links = static::getLinks($file); |
154 | 154 | foreach ($links as $link) { |
155 | 155 | static::checkLink($projectRootDirectory, $link, $file, $errors, $return); |
156 | 156 | } |
157 | 157 | if ([] !== $errors) { |
158 | - echo $title . implode('', $errors); |
|
158 | + echo $title.implode('', $errors); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | ], |
186 | 186 | ], |
187 | 187 | ]); |
188 | - $result = null; |
|
188 | + $result = null; |
|
189 | 189 | try { |
190 | 190 | $headers = get_headers($href, 0, $context); |
191 | 191 | if (false === $headers) { |
192 | - throw new \RuntimeException('Failed getting headers for href ' . $href); |
|
192 | + throw new \RuntimeException('Failed getting headers for href '.$href); |
|
193 | 193 | } |
194 | 194 | foreach ($headers as $header) { |
195 | 195 | if (false !== strpos($header, ' 200 ')) { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $href, |
209 | 209 | var_export($result, true) |
210 | 210 | ); |
211 | - $return = 1; |
|
211 | + $return = 1; |
|
212 | 212 | #$time = round(microtime(true) - $start, 2); |
213 | 213 | #fwrite(STDERR, "\n".'Failed ('.$time.' seconds): '.$href); |
214 | 214 | } |