mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-22 03:53:08 +00:00
Apply more strict type checking
This commit is contained in:
@@ -44,7 +44,7 @@ class ExampleFinder
|
||||
$filename = $example->getFilePath();
|
||||
|
||||
$file = $this->getExampleFileContents($filename);
|
||||
if (!$file) {
|
||||
if ($file === null) {
|
||||
return sprintf('** File not found : %s **', $filename);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class ExampleFinder
|
||||
}
|
||||
}
|
||||
|
||||
if (!$normalizedPath) {
|
||||
if ($normalizedPath === null) {
|
||||
if (is_readable($this->getExamplePathFromSource($filename))) {
|
||||
$normalizedPath = $this->getExamplePathFromSource($filename);
|
||||
} elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) {
|
||||
@@ -122,7 +122,7 @@ class ExampleFinder
|
||||
}
|
||||
}
|
||||
|
||||
$lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false;
|
||||
$lines = $normalizedPath !== null && is_readable($normalizedPath) ? file($normalizedPath) : false;
|
||||
|
||||
return $lines !== false ? $lines : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user