@@ -6,5 +6,5 @@ |
||
6 | 6 | $dir = scandir($path); |
7 | 7 | $ex_folders = array('..', '.'); |
8 | 8 | |
9 | - return array_diff($dir,$ex_folders); |
|
9 | + return array_diff($dir, $ex_folders); |
|
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -1,26 +1,26 @@ |
||
1 | 1 | <?php |
2 | -define('__APP_ROOT__',__DIR__ . '/../') ; |
|
2 | +define('__APP_ROOT__', __DIR__ . '/../'); |
|
3 | 3 | |
4 | -require __APP_ROOT__.'bootstrap/bootstrap.php'; |
|
5 | -require __APP_ROOT__.'core/Functions/helpers.php'; |
|
6 | -require __APP_ROOT__.'vendor/autoload.php'; |
|
7 | -require __APP_ROOT__.'config/settings.php'; |
|
4 | +require __APP_ROOT__ . 'bootstrap/bootstrap.php'; |
|
5 | +require __APP_ROOT__ . 'core/Functions/helpers.php'; |
|
6 | +require __APP_ROOT__ . 'vendor/autoload.php'; |
|
7 | +require __APP_ROOT__ . 'config/settings.php'; |
|
8 | 8 | $app = new \Core\App($config); |
9 | 9 | |
10 | 10 | use SlimFacades\Facade; |
11 | 11 | // get container app |
12 | -require __APP_ROOT__.'bootstrap/dependencies.php'; |
|
13 | -require __APP_ROOT__.'bootstrap/routes.php'; |
|
12 | +require __APP_ROOT__ . 'bootstrap/dependencies.php'; |
|
13 | +require __APP_ROOT__ . 'bootstrap/routes.php'; |
|
14 | 14 | |
15 | -if(php_sapi_name() != 'cli') { |
|
15 | +if (php_sapi_name() != 'cli') { |
|
16 | 16 | $settings['tracy']['path'] = ''; |
17 | - if($app->getContainer() instanceof Psr\Container\ContainerInterface){ |
|
17 | + if ($app->getContainer() instanceof Psr\Container\ContainerInterface) { |
|
18 | 18 | $settings = $app->getContainer()->settings; |
19 | 19 | } |
20 | 20 | Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT, $settings['tracy']['path']); |
21 | 21 | Facade::setFacadeApplication($app); |
22 | 22 | |
23 | - require __APP_ROOT__.'bootstrap/middlewares.php'; |
|
23 | + require __APP_ROOT__ . 'bootstrap/middlewares.php'; |
|
24 | 24 | |
25 | 25 | $app->run(); |
26 | 26 |
@@ -27,12 +27,12 @@ |
||
27 | 27 | |
28 | 28 | |
29 | 29 | |
30 | -$files = getDirFiles(__APP_ROOT__.'app/Routes/'); |
|
30 | +$files = getDirFiles(__APP_ROOT__ . 'app/Routes/'); |
|
31 | 31 | /** Route Partial Loadup =================================================== */ |
32 | 32 | foreach ($files as $partial) { |
33 | - $file = __APP_ROOT__.'app/Routes/'.$partial; |
|
33 | + $file = __APP_ROOT__ . 'app/Routes/' . $partial; |
|
34 | 34 | |
35 | - if ( ! file_exists($file)) |
|
35 | + if (!file_exists($file)) |
|
36 | 36 | { |
37 | 37 | $msg = "Route partial [{$partial}] not found."; |
38 | 38 | throw new \Illuminate\Filesystem\FileNotFoundException($msg); |