Skip to content

Commit 1073ee2

Browse files
committed
Fix register methods
1 parent 604cbed commit 1073ee2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Router.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public function run()
293293
* @param string|null $name
294294
* @return void
295295
*/
296-
public function registerRoute(string $httMethod, string $path, string $controller, string $method, ?string $name = null) : void
296+
public function registerRoute(string $httMethod, string $path, string $controller, string $method, ?string $name = '') : void
297297
{
298298
// Creating route
299299
$route = $this->createRoute($httMethod, $path, $controller, $method, $name);
@@ -319,7 +319,7 @@ public function registerRoute(string $httMethod, string $path, string $controlle
319319
* @param string|null $name
320320
* @return void
321321
*/
322-
public function get(string $path, string $controller, string $method, ?string $name = null) : void
322+
public function get(string $path, string $controller, string $method, ?string $name = '') : void
323323
{
324324
$this->registerRoute('get', $path, $controller, $method, $name);
325325
}
@@ -333,7 +333,7 @@ public function get(string $path, string $controller, string $method, ?string $n
333333
* @param string|null $name
334334
* @return void
335335
*/
336-
public function post(string $path, string $controller, string $method, ?string $name = null) : void
336+
public function post(string $path, string $controller, string $method, ?string $name = '') : void
337337
{
338338
$this->registerRoute('post', $path, $controller, $method, $name);
339339
}
@@ -347,7 +347,7 @@ public function post(string $path, string $controller, string $method, ?string $
347347
* @param string|null $name
348348
* @return void
349349
*/
350-
public function put(string $path, string $controller, string $method, ?string $name = null) : void
350+
public function put(string $path, string $controller, string $method, ?string $name = '') : void
351351
{
352352
$this->registerRoute('put', $path, $controller, $method, $name);
353353
}
@@ -361,7 +361,7 @@ public function put(string $path, string $controller, string $method, ?string $n
361361
* @param string|null $name
362362
* @return void
363363
*/
364-
public function patch(string $path, string $controller, string $method, ?string $name = null) : void
364+
public function patch(string $path, string $controller, string $method, ?string $name = '') : void
365365
{
366366
$this->registerRoute('patch', $path, $controller, $method, $name);
367367
}
@@ -375,7 +375,7 @@ public function patch(string $path, string $controller, string $method, ?string
375375
* @param string|null $name
376376
* @return void
377377
*/
378-
public function delete(string $path, string $controller, string $method, ?string $name = null) : void
378+
public function delete(string $path, string $controller, string $method, ?string $name = '') : void
379379
{
380380
$this->registerRoute('delete', $path, $controller, $method, $name);
381381
}

0 commit comments

Comments
 (0)