• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

klinge / sl-webapp / 18188466427

02 Oct 2025 09:03AM UTC coverage: 61.928% (-1.1%) from 63.01%
18188466427

push

github

web-flow
Merge pull request #105 from klinge/65-add-a-better-routerdispatcher

Changes to League Route instead of AltoRouter

65 of 98 new or added lines in 11 files covered. (66.33%)

1 existing line in 1 file now uncovered.

1272 of 2054 relevant lines covered (61.93%)

3.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/App/Middleware/ApplicationHandler.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace App\Middleware;
6

7
use App\Application;
8
use App\Middleware\Contracts\RequestHandlerInterface;
9
use Psr\Http\Message\ResponseInterface;
10
use Psr\Http\Message\ServerRequestInterface;
11
use League\Route\Router;
12
use League\Route\Http\Exception\NotFoundException;
13

14
class ApplicationHandler implements RequestHandlerInterface
15
{
16
    public function __construct(
17
        private Application $app,
18
        private Router $router
19
    ) {
20
    }
17✔
21

22
    public function handle(ServerRequestInterface $request): ResponseInterface
23
    {
24
        try {
25
            return $this->router->dispatch($request);
2✔
NEW
26
        } catch (NotFoundException $e) {
×
27
            // Get HomeController from container and call pageNotFound method
NEW
28
            $container = $this->app->getContainer();
×
NEW
29
            $homeController = $container->get('App\\Controllers\\HomeController');
×
NEW
30
            return $homeController->pageNotFound();
×
31
        }
32
    }
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc