mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-17 08:58:41 +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
|
||||
{
|
||||
if (\file_exists($path)) {
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
$this->routes += include $path;
|
||||
|
||||
return true;
|
||||
if (!\file_exists($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
/** @noinspection PhpIncludeInspection */
|
||||
$this->routes += include $path;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user