@@ -87,7 +87,7 @@ |
||
87 | 87 | * @param mixed $matches parameters from request |
88 | 88 | * @param mixed $parameters expected parameters from route |
89 | 89 | |
90 | - * @return array parametrs in right order, if there are not any parametrs an empty array is returned |
|
90 | + * @return callable parametrs in right order, if there are not any parametrs an empty array is returned |
|
91 | 91 | */ |
92 | 92 | private function _getFunctionArguments($paramMap, $matches, $parameters) { |
93 | 93 | $output = []; |
@@ -86,7 +86,6 @@ |
||
86 | 86 | * @param mixed $paramMap parameter map - that will be used for getting proper order |
87 | 87 | * @param mixed $matches parameters from request |
88 | 88 | * @param mixed $parameters expected parameters from route |
89 | - |
|
90 | 89 | * @return array parametrs in right order, if there are not any parametrs an empty array is returned |
91 | 90 | */ |
92 | 91 | private function _getFunctionArguments($paramMap, $matches, $parameters) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @param mixed $matches found matched variables |
123 | 123 | * @param mixed $parameters route parameters |
124 | - * @param mixed $handler handler that should be executed |
|
124 | + * @param string $handler handler that should be executed |
|
125 | 125 | * |
126 | 126 | * @return mixed |
127 | 127 | */ |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @param mixed $handler handler that should be executed |
176 | 176 | * @param mixed $matches found matched variables |
177 | 177 | |
178 | - * @return mixed |
|
178 | + * @return string |
|
179 | 179 | */ |
180 | 180 | private function _resolveNamespace($parameters, $handler, $matches) { |
181 | 181 | if (isset($handler['module'])) { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * @param mixed $paramMap parameter map |
221 | 221 | * @param mixed $matches found matched variables |
222 | 222 | * @param mixed $parameters route parameters |
223 | - * @param mixed $handlers handler that should be executed |
|
223 | + * @param string $handlers handler that should be executed |
|
224 | 224 | |
225 | 225 | * @return mixed |
226 | 226 | */ |
@@ -174,7 +174,6 @@ discard block |
||
174 | 174 | * @param mixed $parameters route parameters |
175 | 175 | * @param mixed $handler handler that should be executed |
176 | 176 | * @param mixed $matches found matched variables |
177 | - |
|
178 | 177 | * @return mixed |
179 | 178 | */ |
180 | 179 | private function _resolveNamespace($parameters, $handler, $matches) { |
@@ -221,7 +220,6 @@ discard block |
||
221 | 220 | * @param mixed $matches found matched variables |
222 | 221 | * @param mixed $parameters route parameters |
223 | 222 | * @param mixed $handlers handler that should be executed |
224 | - |
|
225 | 223 | * @return mixed |
226 | 224 | */ |
227 | 225 | private function _getFunctionArgumentsControlers($paramMap, $matches, $parameters, $handlers) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | return [$transformed['controler'], $transformed['action']]; |
149 | - } else if ($this->_isPlaceholder($action)) { |
|
149 | + } else if ($this->_isPlaceholder($action)) { |
|
150 | 150 | $matches = array_values($matches); |
151 | 151 | |
152 | 152 | $transformed = []; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | } |
164 | 164 | |
165 | - return [$this->_resolveNamespace($parameters, $handler, $matches).'\\'.$controler, $transformed['action']]; // naive solution... |
|
165 | + return [$this->_resolveNamespace($parameters, $handler, $matches).'\\'.$controler, $transformed['action']]; // naive solution... |
|
166 | 166 | } else { |
167 | 167 | return [$this->_resolveNamespace($parameters, $handler, $matches).'\\'.$controler, $action]; |
168 | 168 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | private function _resolveNamespace($parameters, $handler, $matches) { |
181 | 181 | if (isset($handler['module'])) { |
182 | 182 | $moduleName = $handler['module']; |
183 | - if ($this->_isPlaceholder($moduleName)) { |
|
183 | + if ($this->_isPlaceholder($moduleName)) { |
|
184 | 184 | $transformed = []; |
185 | 185 | foreach ($handler as $target => $placeholder) { |
186 | 186 | foreach ($parameters as $key => $parameterName) { |
@@ -148,7 +148,7 @@ |
||
148 | 148 | /** |
149 | 149 | * Get format for URL resolving. |
150 | 150 | * |
151 | - * @return boolean |
|
151 | + * @return string |
|
152 | 152 | */ |
153 | 153 | public function getUrlFormat() { |
154 | 154 | return $this->_urlFormat; |
@@ -188,7 +188,7 @@ |
||
188 | 188 | |
189 | 189 | list($routeRegex, $parameters) = $this->_transformRoute($routeUrl); |
190 | 190 | $route->setParsed($routeRegex) |
191 | - ->setParameters($parameters); |
|
191 | + ->setParameters($parameters); |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | return $routes; |
@@ -53,6 +53,6 @@ |
||
53 | 53 | */ |
54 | 54 | public static function isInEnum($value) { |
55 | 55 | $allItems = array_flip(self::toArray()); |
56 | - return isset($allItems[$value]) ? true:false; |
|
56 | + return isset($allItems[$value]) ? true : false; |
|
57 | 57 | } |
58 | 58 | } |