@@ -51,17 +51,17 @@ |
||
51 | 51 | */ |
52 | 52 | function env(string $key):mixed |
53 | 53 | { |
54 | - if (isset($_ENV[$key])) { |
|
54 | + if (isset($_ENV[$key])) { |
|
55 | 55 | return $_ENV[$key]; |
56 | - } |
|
57 | - if(getenv($key)){ |
|
56 | + } |
|
57 | + if(getenv($key)){ |
|
58 | 58 | return getenv($key); |
59 | - } |
|
59 | + } |
|
60 | 60 | |
61 | - if(request()->server->has($key)){ |
|
61 | + if(request()->server->has($key)){ |
|
62 | 62 | return request()->server->get($key); |
63 | - } |
|
63 | + } |
|
64 | 64 | |
65 | - return null; |
|
65 | + return null; |
|
66 | 66 | } |
67 | 67 | } |
@@ -45,11 +45,11 @@ |
||
45 | 45 | return $this->container->make($class, $params); |
46 | 46 | } |
47 | 47 | |
48 | - /** |
|
49 | - * Check if a class is registered in the container |
|
50 | - * @param string $class |
|
51 | - * @return bool |
|
52 | - */ |
|
48 | + /** |
|
49 | + * Check if a class is registered in the container |
|
50 | + * @param string $class |
|
51 | + * @return bool |
|
52 | + */ |
|
53 | 53 | public function has(string $class): bool |
54 | 54 | { |
55 | 55 | return $this->container->has($class); |
@@ -3,21 +3,21 @@ |
||
3 | 3 | |
4 | 4 | trait Router |
5 | 5 | { |
6 | - /** |
|
7 | - * Register controller directory and namespace for autorouting |
|
8 | - * @param string $dir |
|
9 | - * @param string $namespace |
|
10 | - */ |
|
6 | + /** |
|
7 | + * Register controller directory and namespace for autorouting |
|
8 | + * @param string $dir |
|
9 | + * @param string $namespace |
|
10 | + */ |
|
11 | 11 | public function registerAutoRoute(string $dir, string $namespace): void |
12 | 12 | { |
13 | 13 | $this->router->register($dir, $namespace); |
14 | 14 | } |
15 | 15 | |
16 | - /** |
|
17 | - * Register a new get route with the router |
|
18 | - * @param string $route |
|
19 | - * @param \Closure|callable $callback |
|
20 | - */ |
|
16 | + /** |
|
17 | + * Register a new get route with the router |
|
18 | + * @param string $route |
|
19 | + * @param \Closure|callable $callback |
|
20 | + */ |
|
21 | 21 | public function get(string $route, \Closure|callable $callback): void |
22 | 22 | { |
23 | 23 | if(is_callable($callback)){ |