@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function handle(Application $app, $next) |
| 11 | 11 | { |
| 12 | - if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { |
|
| 12 | + if (empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { |
|
| 13 | 13 | return $app->url->redirectTo('404'); |
| 14 | 14 | } |
| 15 | 15 | return $next; |
@@ -132,8 +132,8 @@ |
||
| 132 | 132 | |
| 133 | 133 | foreach ($parameters as $parameter) { |
| 134 | 134 | $name = $parameter; |
| 135 | - $length = strpos($url, $parameter) + strlen($parameter); |
|
| 136 | - $link = substr($url, 0, $length); |
|
| 135 | + $length = strpos($url, $parameter) + strlen($parameter); |
|
| 136 | + $link = substr($url, 0, $length); |
|
| 137 | 137 | |
| 138 | 138 | $return[] = [ |
| 139 | 139 | 'name' => $name, |
@@ -117,7 +117,9 @@ |
||
| 117 | 117 | */ |
| 118 | 118 | public function share($key, $value) |
| 119 | 119 | { |
| 120 | - if ($value instanceof Closure) $value = call_user_func($value, $this); |
|
| 120 | + if ($value instanceof Closure) { |
|
| 121 | + $value = call_user_func($value, $this); |
|
| 122 | + } |
|
| 121 | 123 | $this->container[$key] = $value; |
| 122 | 124 | } |
| 123 | 125 | |