@@ -156,7 +156,7 @@ |
||
156 | 156 | * |
157 | 157 | * @param string $path |
158 | 158 | * |
159 | - * @return array|bool|null |
|
159 | + * @return boolean |
|
160 | 160 | */ |
161 | 161 | public function has($path) |
162 | 162 | { |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | { |
212 | 212 | //@NOTE: The github API does not return a MIME type, so we have to guess :-( |
213 | 213 | if (strrpos($path, '.') > 1) { |
214 | - $extension = substr($path, strrpos($path, '.')+1); |
|
214 | + $extension = substr($path, strrpos($path, '.') + 1); |
|
215 | 215 | $mimeType = MimeType::detectByFileExtension($extension) ?: 'text/plain'; |
216 | 216 | } else { |
217 | 217 | $content = $this->getFileContents($path); |
@@ -255,8 +255,8 @@ discard block |
||
255 | 255 | */ |
256 | 256 | private function extractMetaDataFromTreeInfo(array $tree, $path, $recursive) |
257 | 257 | { |
258 | - if(empty($path) === false) { |
|
259 | - $metadata = array_filter($tree, function ($entry) use ($path, $recursive) { |
|
258 | + if (empty($path) === false) { |
|
259 | + $metadata = array_filter($tree, function($entry) use ($path, $recursive) { |
|
260 | 260 | $match = false; |
261 | 261 | |
262 | 262 | if (strpos($entry[self::KEY_PATH], $path) === 0) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | return $match; |
272 | 272 | }); |
273 | 273 | } elseif ($recursive === false) { |
274 | - $metadata = array_filter($tree, function ($entry) use ($path) { |
|
274 | + $metadata = array_filter($tree, function($entry) use ($path) { |
|
275 | 275 | return (strpos($entry[self::KEY_PATH], '/', strlen($path)) === false); |
276 | 276 | }); |
277 | 277 | } else { |