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,16 +46,16 @@ final class Router
*/
public function importFromFile(string $path) : bool
{
if (\file_exists($path)) {
if (!\file_exists($path)) {
return false;
}
/** @noinspection PhpIncludeInspection */
$this->routes += include $path;
return true;
}
return false;
}
/**
* Add route.
*