@@ -10,7 +10,7 @@ |
||
10 | 10 | public function kill() |
11 | 11 | { |
12 | 12 | $this->parentArray->del($this->path()); |
13 | - $this->data = [ ]; |
|
13 | + $this->data = []; |
|
14 | 14 | |
15 | 15 | return $this; |
16 | 16 | } |
@@ -14,12 +14,12 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * Helper list. |
16 | 16 | */ |
17 | - private $helperList = [ ]; |
|
17 | + private $helperList = []; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * Functions Routes. |
21 | 21 | */ |
22 | - private $functionRoutes = [ ]; |
|
22 | + private $functionRoutes = []; |
|
23 | 23 | |
24 | 24 | |
25 | 25 | /** |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public static function getInstance() |
29 | 29 | { |
30 | - if ( ! self::$instance ) |
|
30 | + if ( ! self::$instance) |
|
31 | 31 | { |
32 | 32 | self::$instance = new self(); |
33 | 33 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function addRoute($functionRoute, callable $function) |
70 | 70 | { |
71 | - if ( $this->isRoute($functionRoute) ) |
|
71 | + if ($this->isRoute($functionRoute)) |
|
72 | 72 | { |
73 | 73 | return false; |
74 | 74 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function isRoute($functionName) |
86 | 86 | { |
87 | - return isset( $this->functionRoutes[$functionName] ); |
|
87 | + return isset($this->functionRoutes[$functionName]); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $helperName = $helperObject->getName(); |
101 | 101 | |
102 | - if ( $this->isHelper($helperName) ) |
|
102 | + if ($this->isHelper($helperName)) |
|
103 | 103 | { |
104 | 104 | return false; |
105 | 105 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function execute($functionName, $arguments, $knot) |
122 | 122 | { |
123 | - if ( $this->isRoute($functionName) ) |
|
123 | + if ($this->isRoute($functionName)) |
|
124 | 124 | { |
125 | 125 | $targetFunction = $this->getRoute($functionName); |
126 | 126 | |
@@ -148,6 +148,6 @@ discard block |
||
148 | 148 | |
149 | 149 | public function isHelper($helperName) |
150 | 150 | { |
151 | - return isset( $this->helperList[$helperName] ); |
|
151 | + return isset($this->helperList[$helperName]); |
|
152 | 152 | } |
153 | 153 | } |
@@ -127,13 +127,11 @@ |
||
127 | 127 | try |
128 | 128 | { |
129 | 129 | return call_user_func($targetFunction, $knot, $arguments, $functionName); |
130 | - } |
|
131 | - catch (\Exception $e) |
|
130 | + } catch (\Exception $e) |
|
132 | 131 | { |
133 | 132 | throw new FunctionExecuteException($functionName); |
134 | 133 | } |
135 | - } |
|
136 | - else |
|
134 | + } else |
|
137 | 135 | { |
138 | 136 | throw new WrongFunctionException($functionName); |
139 | 137 | } |