@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[fp:'.BaseType::PARAMETER_NAME_REGEXP.'+\])'; |
|
19 | + return '(\[fp:' . BaseType::PARAMETER_NAME_REGEXP . '+\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[s:'.BaseType::PARAMETER_NAME_REGEXP.'\])'; |
|
19 | + return '(\[s:' . BaseType::PARAMETER_NAME_REGEXP . '\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[il:'.BaseType::PARAMETER_NAME_REGEXP.'\])'; |
|
19 | + return '(\[il:' . BaseType::PARAMETER_NAME_REGEXP . '\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[a:'.BaseType::PARAMETER_NAME_REGEXP.'\])'; |
|
19 | + return '(\[a:' . BaseType::PARAMETER_NAME_REGEXP . '\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[i:'.BaseType::PARAMETER_NAME_REGEXP.'+\])'; |
|
19 | + return '(\[i:' . BaseType::PARAMETER_NAME_REGEXP . '+\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public static function searchRegExp(): string |
18 | 18 | { |
19 | - return '(\[date:'.BaseType::PARAMETER_NAME_REGEXP.'\])'; |
|
19 | + return '(\[date:' . BaseType::PARAMETER_NAME_REGEXP . '\])'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router; |
4 | 4 | |
5 | 5 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $routerTrimmed = trim($router, '/'); |
32 | 32 | |
33 | - if (! isset($this->middleware[$routerTrimmed])) { |
|
33 | + if (!isset($this->middleware[$routerTrimmed])) { |
|
34 | 34 | $this->middleware[$routerTrimmed] = []; |
35 | 35 | } |
36 | 36 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getParam(string $name): string |
55 | 55 | { |
56 | - if (! isset($this->parameters[$name])) { |
|
56 | + if (!isset($this->parameters[$name])) { |
|
57 | 57 | throw (new \Exception('Parameter ' . $name . ' was not found in route', - 1)); |
58 | 58 | } |
59 | 59 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $this->parameters |
131 | 131 | ]; |
132 | 132 | |
133 | - if (! count($middleWares)) { |
|
133 | + if (!count($middleWares)) { |
|
134 | 134 | return $result; |
135 | 135 | } |
136 | 136 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router; |
4 | 4 | |
5 | 5 | /** |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $methodName[0] = strtolower($methodName[0]); |
33 | 33 | } |
34 | 34 | |
35 | - for ($i = 1; $i < strlen($methodName); $i ++) { |
|
35 | + for ($i = 1; $i < strlen($methodName); $i++) { |
|
36 | 36 | if (ctype_upper($methodName[$i])) { |
37 | 37 | $methodName = substr_replace($methodName, '-' . strtolower($methodName[$i]), $i, 1); |
38 | 38 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | namespace Mezon\Router; |
4 | 4 | |
5 | 5 | /** |