@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | -function url(string $name ,array $params) |
|
5 | +function url(string $name, array $params) |
|
6 | 6 | { |
7 | 7 | $url = new \Core\Helpers\Url($GLOBALS['container']); |
8 | - return $url->get($name , $params); |
|
8 | + return $url->get($name, $params); |
|
9 | 9 | } |
10 | 10 | |
11 | -url('admin.user.list',[]); |
|
12 | 11 | \ No newline at end of file |
12 | +url('admin.user.list', []); |
|
13 | 13 | \ No newline at end of file |
@@ -5,5 +5,5 @@ |
||
5 | 5 | $dir = scandir($path); |
6 | 6 | $ex_folders = array('..', '.'); |
7 | 7 | |
8 | - return array_diff($dir,$ex_folders); |
|
8 | + return array_diff($dir, $ex_folders); |
|
9 | 9 | } |
@@ -19,9 +19,9 @@ |
||
19 | 19 | { |
20 | 20 | $this->container = $container; |
21 | 21 | } |
22 | - public function get( $name, $params = array() ) |
|
22 | + public function get($name, $params = array()) |
|
23 | 23 | { |
24 | - $route = $this->container->get('router')->pathFor($name,$params); |
|
24 | + $route = $this->container->get('router')->pathFor($name, $params); |
|
25 | 25 | |
26 | 26 | |
27 | 27 | return $route; |
@@ -1,33 +1,33 @@ |
||
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__.'vendor/autoload.php'; |
|
6 | -require __APP_ROOT__.'config/settings.php'; |
|
4 | +require __APP_ROOT__ . 'bootstrap/bootstrap.php'; |
|
5 | +require __APP_ROOT__ . 'vendor/autoload.php'; |
|
6 | +require __APP_ROOT__ . 'config/settings.php'; |
|
7 | 7 | |
8 | -require __APP_ROOT__.'core/Functions/general_helpers.php'; |
|
8 | +require __APP_ROOT__ . 'core/Functions/general_helpers.php'; |
|
9 | 9 | |
10 | 10 | |
11 | 11 | $app = new \Core\App($config); |
12 | 12 | |
13 | 13 | use SlimFacades\Facade; |
14 | 14 | // get container app |
15 | -require __APP_ROOT__.'bootstrap/dependencies.php'; |
|
15 | +require __APP_ROOT__ . 'bootstrap/dependencies.php'; |
|
16 | 16 | |
17 | -require __APP_ROOT__.'bootstrap/routes.php'; |
|
18 | -require __APP_ROOT__.'core/Functions/helpers.php'; |
|
17 | +require __APP_ROOT__ . 'bootstrap/routes.php'; |
|
18 | +require __APP_ROOT__ . 'core/Functions/helpers.php'; |
|
19 | 19 | |
20 | -if(php_sapi_name() != 'cli') { |
|
20 | +if (php_sapi_name() != 'cli') { |
|
21 | 21 | $settings['tracy']['path'] = ''; |
22 | - if($app->getContainer() instanceof Psr\Container\ContainerInterface){ |
|
22 | + if ($app->getContainer() instanceof Psr\Container\ContainerInterface) { |
|
23 | 23 | $settings = $app->getContainer()->settings; |
24 | - if($settings['debug'] == true){ |
|
24 | + if ($settings['debug'] == true) { |
|
25 | 25 | Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT, $settings['tracy']['path']); |
26 | 26 | } |
27 | 27 | Facade::setFacadeApplication($app); |
28 | 28 | } |
29 | 29 | |
30 | - require __APP_ROOT__.'bootstrap/middlewares.php'; |
|
30 | + require __APP_ROOT__ . 'bootstrap/middlewares.php'; |
|
31 | 31 | |
32 | 32 | $app->run(); |
33 | 33 |