Skip to content

Commit

Permalink
Fix coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Aug 16, 2023
1 parent 9f1e9a3 commit d3fb776
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require_once "../vendor/autoload.php";

use FastRoute\RouteCollector;
use Laminas\Diactoros\Response;
use Laminas\Diactoros\ServerRequestFactory;
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
Expand All @@ -17,8 +18,10 @@
use WoohooLabs\Harmony\Middleware\FastRouteMiddleware;
use WoohooLabs\Harmony\Middleware\LaminasEmitterMiddleware;

use function FastRoute\simpleDispatcher;

// Initializing the router
$router = FastRoute\simpleDispatcher(static function (FastRoute\RouteCollector $r) {
$router = simpleDispatcher(static function (RouteCollector $r) {
$r->addRoute("GET", "/me", static function (ServerRequestInterface $request, ResponseInterface $response) {
$response->getBody()->write("Hello, World!");

Expand Down

0 comments on commit d3fb776

Please sign in to comment.