Skip to content

Commit

Permalink
Fix code by psr
Browse files Browse the repository at this point in the history
  • Loading branch information
propan13 committed Jun 4, 2024
1 parent 40a75b4 commit 1fcdbe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/src/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct()
public function dispatch(Route $route): void
{
if ($this->issetRoute($route)) {
$call = new $this->routes[$route->getCommandName()];
$call = new $this->routes[$route->getCommandName()]();
$call();
} else {
throw new Exception('Command not found');
Expand All @@ -41,4 +41,4 @@ private function issetRoute(Route $route): bool
{
return isset($this->routes[$route->getCommandName()]);
}
}
}

Check failure on line 44 in code/src/Router/Router.php

View workflow job for this annotation

GitHub Actions / phpcs

Expected 1 newline at end of file; 0 found

0 comments on commit 1fcdbe9

Please sign in to comment.