Phpstan to max level

This commit is contained in:
Jaapio
2019-09-20 16:52:17 +02:00
parent aee984014b
commit 19a1f3a91f
21 changed files with 156 additions and 102 deletions
+5 -2
View File
@@ -96,8 +96,10 @@ class ExampleFinder
* 2. Checks the source folder for the given filename
* 3. Checks the 'examples' folder in the current working directory for examples
* 4. Checks the path relative to the current working directory for the given filename
*
* @return string[] all lines of the example file
*/
private function getExampleFileContents(string $filename) : ?string
private function getExampleFileContents(string $filename) : ?array
{
$normalizedPath = null;
@@ -119,7 +121,8 @@ class ExampleFinder
}
}
return $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : null;
$lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false;
return $lines !== false ? $lines : null;
}
/**