Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cpt-erwin committed Jan 28, 2021
1 parent 8df9bf5 commit e3fd26a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace Okami\Core;

use Okami\Core\Middlewares\Middleware;

/**
* Class Controller
*
Expand Down
12 changes: 8 additions & 4 deletions Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,23 @@ public function __construct(Request $request, Response $response)
/**
* @param string $path
* @param string|callable|array $callback
*
* @return Route
*/
public function get(string $path, $callback)
public function get(string $path, $callback): Route
{
$this->addRoute('get', $path, $callback);
return $this->addRoute('get', $path, $callback);
}

/**
* @param string $path
* @param string|callable|array $callback
*
* @return Route
*/
public function post(string $path, $callback)
public function post(string $path, $callback): Route
{
$this->addRoute('post', $path, $callback);
return $this->addRoute('post', $path, $callback);
}

/**
Expand Down

0 comments on commit e3fd26a

Please sign in to comment.