Fix line 23 error, must be [$app, 'handle'] instead $app.
There's a typo error in line 44, $app->pipe(new NotFoundHandler(new Response());, lacks the last ). Also, an instance of Zend\Diactoros\Response is passed as an argument, but NotFoundHandler needs a callable, so I changed to a working example of a not simple 404 implementation.
Fix line 23 error, must be
[$app, 'handle']
instead$app
.There's a typo error in line 44,
$app->pipe(new NotFoundHandler(new Response());
, lacks the last)
. Also, an instance ofZend\Diactoros\Response
is passed as an argument, butNotFoundHandler
needs acallable
, so I changed to a working example of a not simple 404 implementation.Fixed indentation in line 47.
Removed unused imports.
[x] Is this related to documentation?