mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 15:38:40 +00:00
optimize file import
This commit is contained in:
parent
7a7505193d
commit
d4bc7a66bf
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user