@@ -153,6 +153,9 @@ |
||
| 153 | 153 | return $requestPath; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | + /** |
|
| 157 | + * @param string $requestMethods |
|
| 158 | + */ |
|
| 156 | 159 | public function add( |
| 157 | 160 | $requestMethods, |
| 158 | 161 | string $route, |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | * @link https://github.com/selamiphp/router |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | -declare(strict_types = 1); |
|
| 13 | +declare(strict_types=1); |
|
| 14 | 14 | |
| 15 | 15 | namespace Selami\Router; |
| 16 | 16 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | } |
| 116 | 116 | $this->method = $method; |
| 117 | 117 | $this->requestedPath = $requestedPath; |
| 118 | - $this->defaultReturnType = ($defaultReturnType >=1 && $defaultReturnType <=7) ? $defaultReturnType : self::HTML; |
|
| 118 | + $this->defaultReturnType = ($defaultReturnType >= 1 && $defaultReturnType <= 7) ? $defaultReturnType : self::HTML; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | public function withDefaultReturnType(int $defaultReturnType) : self |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | if ($returnType === null) { |
| 191 | 191 | return $this->defaultReturnType; |
| 192 | 192 | } |
| 193 | - return ($returnType >=1 && $returnType <=7) ? $returnType : self::HTML; |
|
| 193 | + return ($returnType >= 1 && $returnType <= 7) ? $returnType : self::HTML; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | private function checkRequestMethodIsValid(string $requestMethod) : void |