@@ -14,7 +14,9 @@ |
||
14 | 14 | public static function __callStatic($method, $parameters = []) |
15 | 15 | { |
16 | 16 | $className = str_replace("Facade", "", static::class); |
17 | - if (!class_exists($className)) $className = str_replace("\s", "", $className); |
|
17 | + if (!class_exists($className)) { |
|
18 | + $className = str_replace("\s", "", $className); |
|
19 | + } |
|
18 | 20 | |
19 | 21 | if (!Rudra::has($className)) { |
20 | 22 | Rudra::set([$className, [$className]]); |
@@ -50,7 +50,9 @@ |
||
50 | 50 | throw new \InvalidArgumentException("The array contains the wrong number of elements"); |
51 | 51 | } |
52 | 52 | |
53 | - if (!is_array($data[1])) setcookie($data[0], $data[1]); |
|
53 | + if (!is_array($data[1])) { |
|
54 | + setcookie($data[0], $data[1]); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | setcookie($data[0], $data[1][0], $data[1][1]); |
56 | 58 | } |
@@ -24,28 +24,36 @@ |
||
24 | 24 | |
25 | 25 | public function binding(array $contracts = []): ContainerInterface |
26 | 26 | { |
27 | - if (!$this->has("binding")) $this->set(["binding", new Container($contracts)]); |
|
27 | + if (!$this->has("binding")) { |
|
28 | + $this->set(["binding", new Container($contracts)]); |
|
29 | + } |
|
28 | 30 | |
29 | 31 | return $this->get("binding"); |
30 | 32 | } |
31 | 33 | |
32 | 34 | public function services(array $services = []): ContainerInterface |
33 | 35 | { |
34 | - if (!$this->has("services")) $this->set(["services", new Container($services)]); |
|
36 | + if (!$this->has("services")) { |
|
37 | + $this->set(["services", new Container($services)]); |
|
38 | + } |
|
35 | 39 | |
36 | 40 | return $this->get("services"); |
37 | 41 | } |
38 | 42 | |
39 | 43 | public function config(array $config = []): ContainerInterface |
40 | 44 | { |
41 | - if (!$this->has("config")) $this->set(["config", new Container($config)]); |
|
45 | + if (!$this->has("config")) { |
|
46 | + $this->set(["config", new Container($config)]); |
|
47 | + } |
|
42 | 48 | |
43 | 49 | return $this->get("config"); |
44 | 50 | } |
45 | 51 | |
46 | 52 | public function data(array $data = []): ContainerInterface |
47 | 53 | { |
48 | - if (!$this->has("data")) $this->set(["data", new Container($data)]); |
|
54 | + if (!$this->has("data")) { |
|
55 | + $this->set(["data", new Container($data)]); |
|
56 | + } |
|
49 | 57 | |
50 | 58 | return $this->get("data"); |
51 | 59 | } |