Continuous Integration Fixes
Some checks are pending
/ ls (push) Waiting to run

This commit is contained in:
Continuous Integration 2023-11-30 20:39:40 +00:00
parent 28491fd4ea
commit 23d37db8f6
16 changed files with 23 additions and 38 deletions

View file

@ -14,7 +14,7 @@ use function assert;
require_once __DIR__ . '/../vendor/autoload.php';
$cached = false;
$container = (new ContainerBuilder)->addDefinitions(
$container = (new ContainerBuilder())->addDefinitions(
[
Finder::class => static fn(): Finder => new Finder(__DIR__, [], $cached),
Dispatcher::class => static fn(DispatcherFactory $f): Dispatcher

View file

@ -11,8 +11,7 @@ final readonly class Lol
{
public function __construct(
private Dispatcher $dispatcher
) {
}
) {}
#[AsHandler(HttpMethod::GET, '/')]
public function lol(): void

View file

@ -14,6 +14,5 @@ final readonly class AsListener
public function __construct(
public string $eventClass,
public int $priority = 0
) {
}
) {}
}

View file

@ -15,8 +15,7 @@ final class Dispatcher
public function __construct(
private readonly InvokerInterface $invoker,
private array $listeners = [],
) {
}
) {}
public function addListener(Listener $listener): void
{

View file

@ -18,8 +18,7 @@ final readonly class DispatcherFactory
public function __construct(
private Finder $finder,
private InvokerInterface $invoker,
) {
}
) {}
public function getDispatcher(bool $cached = false): Dispatcher
{

View file

@ -15,6 +15,5 @@ final readonly class Listener
public int $priority,
public string $listenerClass,
public string $listenerMethod,
) {
}
) {}
}

View file

@ -34,8 +34,7 @@ final class Finder
private readonly string $path,
private array $classNames = [],
private readonly bool $cached = false,
) {
}
) {}
/**
* @return Listener[]

View file

@ -12,8 +12,7 @@ class HttpKernel
{
public function __construct(
private readonly Dispatcher $dispatcher
) {
}
) {}
public function handle(Request $request): Response
{

View file

@ -13,6 +13,5 @@ final readonly class AsHandler
public function __construct(
public HttpMethod $method,
public string $path
) {
}
) {}
}

View file

@ -13,6 +13,5 @@ final readonly class Handler
public string $path,
public string $handlerClass,
public string $handlerMethod,
) {
}
) {}
}

View file

@ -13,6 +13,5 @@ final class RequestEvent extends GenericEvent
public Request $request,
public Response|null $response = null,
public Handler|null $handler = null,
) {
}
) {}
}

View file

@ -9,8 +9,7 @@ final readonly class AttributeRouteCollector
{
public function __construct(
private Finder $finder
) {
}
) {}
#[AsListener(CollectRoutes::class)]
public function collect(CollectRoutes $event): void

View file

@ -14,6 +14,5 @@ final class CollectRoutes extends GenericEvent
public function __construct(
public readonly bool $cached = false
) {
}
) {}
}

View file

@ -14,8 +14,7 @@ final readonly class HandlerCaller
{
public function __construct(
private InvokerInterface $invoker
) {
}
) {}
#[AsListener(RequestEvent::class, -50)]
public function callHandler(RequestEvent $event): void

View file

@ -21,8 +21,7 @@ final readonly class HandlerResolver
public function __construct(
private Dispatcher $dispatcher,
private bool $cached = false,
) {
}
) {}
#[AsListener(RequestEvent::class, -90)]
public function resolveHandler(RequestEvent $event): void

View file

@ -8,6 +8,5 @@ final class LauschEvent extends GenericEvent
{
public function __construct(
public string $message
) {
}
) {}
}