Skip to content

Commit

Permalink
Merge pull request #31 from gacela-project/add-router-interface
Browse files Browse the repository at this point in the history
Create RouterInterface
  • Loading branch information
Chemaclass authored May 6, 2023
2 parents f887dc3 + a5e6285 commit 94bc2df
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use function is_callable;
use function is_null;

final class Router
final class Router implements RouterInterface
{
private Routes $routes;
private Bindings $bindings;
Expand Down
14 changes: 14 additions & 0 deletions src/Router/RouterInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

declare(strict_types=1);

namespace Gacela\Router;

use Closure;

interface RouterInterface
{
public function configure(Closure $fn): self;

public function run(): void;
}

0 comments on commit 94bc2df

Please sign in to comment.