optimize file import

This commit is contained in:
Dennis Eichhorn 2018-12-01 22:26:25 +01:00
parent 7a7505193d
commit d4bc7a66bf

View File

@ -46,14 +46,14 @@ final class Router
*/ */
public function importFromFile(string $path) : bool public function importFromFile(string $path) : bool
{ {
if (\file_exists($path)) { if (!\file_exists($path)) {
/** @noinspection PhpIncludeInspection */ return false;
$this->routes += include $path;
return true;
} }
return false; /** @noinspection PhpIncludeInspection */
$this->routes += include $path;
return true;
} }
/** /**