Skip to content

Commit 78e0944

Browse files
author
Anton
authored
Merge pull request #478 from bluzphp/develop
HotFix for Router
2 parents ec0174b + 5719730 commit 78e0944

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/Router/Router.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ public function setBaseUrl(string $baseUrl): void
184184
/**
185185
* Get an action parameter
186186
*
187-
* @param string $key
188-
* @param mixed $default Default value to use if key not found
187+
* @param mixed $key
188+
* @param mixed $default Default value to use if key not found
189189
*
190190
* @return mixed
191191
*/
192-
public function getParam(string $key, $default = null)
192+
public function getParam($key, $default = null)
193193
{
194194
return $this->params[$key] ?? $default;
195195
}
@@ -199,18 +199,18 @@ public function getParam(string $key, $default = null)
199199
*
200200
* A $value of null will unset the $key if it exists
201201
*
202-
* @param string $key
203-
* @param mixed $value
202+
* @param mixed $key
203+
* @param mixed $value
204204
*
205205
* @return void
206206
*/
207-
public function setParam(string $key, $value): void
207+
public function setParam($key, $value): void
208208
{
209209
$key = (string)$key;
210210

211-
if ((null === $value) && isset($this->params[$key])) {
211+
if (null === $value) {
212212
unset($this->params[$key]);
213-
} elseif (null !== $value) {
213+
} else {
214214
$this->params[$key] = $value;
215215
}
216216
}

0 commit comments

Comments
 (0)