[rector] update dependencies
[CI SKIP]
This commit is contained in:
parent
92c4da5217
commit
5bd1eae4d2
9 changed files with 28 additions and 30 deletions
|
@ -7,10 +7,10 @@ use Lubian\AttributeMagic\Infrastructure\Route\AsHandler;
|
|||
use Lubian\AttributeMagic\Infrastructure\Route\HttpMethod;
|
||||
use Lubian\AttributeMagic\Listener\LauschEvent;
|
||||
|
||||
final class Lol
|
||||
final readonly class Lol
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Dispatcher $dispatcher,
|
||||
private Dispatcher $dispatcher,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,16 +4,15 @@ namespace Lubian\AttributeMagic\Infrastructure\Event;
|
|||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
final class AsListener
|
||||
#[Attribute(Attribute::TARGET_METHOD)]final readonly class AsListener
|
||||
{
|
||||
/**
|
||||
* @param class-string $eventClass
|
||||
* @param int<-100, 100> $priority
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly string $eventClass,
|
||||
public readonly int $priority = 0,
|
||||
public string $eventClass,
|
||||
public int $priority = 0,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,13 @@ use function file_put_contents;
|
|||
use function serialize;
|
||||
use function unserialize;
|
||||
|
||||
final class DispatcherFactory
|
||||
final readonly class DispatcherFactory
|
||||
{
|
||||
public const CACHE_FILE = __DIR__ . '/../../../var/listenerCache';
|
||||
|
||||
public function __construct(
|
||||
private readonly Finder $finder,
|
||||
private readonly InvokerInterface $invoker
|
||||
private Finder $finder,
|
||||
private InvokerInterface $invoker
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Lubian\AttributeMagic\Infrastructure\Event;
|
||||
|
||||
final class Listener
|
||||
final readonly class Listener
|
||||
{
|
||||
/**
|
||||
* @param class-string $eventClass
|
||||
|
@ -11,10 +11,10 @@ final class Listener
|
|||
* @param non-empty-string $listenerMethod
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly string $eventClass,
|
||||
public readonly int $priority,
|
||||
public readonly string $listenerClass,
|
||||
public readonly string $listenerMethod,
|
||||
public string $eventClass,
|
||||
public int $priority,
|
||||
public string $listenerClass,
|
||||
public string $listenerMethod,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,15 +4,14 @@ namespace Lubian\AttributeMagic\Infrastructure\Route;
|
|||
|
||||
use Attribute;
|
||||
|
||||
#[Attribute(Attribute::TARGET_METHOD)]
|
||||
final class AsHandler
|
||||
#[Attribute(Attribute::TARGET_METHOD)]final readonly class AsHandler
|
||||
{
|
||||
/**
|
||||
* @param non-empty-string $path
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly HttpMethod $method,
|
||||
public readonly string $path,
|
||||
public HttpMethod $method,
|
||||
public string $path,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
namespace Lubian\AttributeMagic\Infrastructure\Route;
|
||||
|
||||
final class Handler
|
||||
final readonly class Handler
|
||||
{
|
||||
/**
|
||||
* @param non-empty-string $handlerClass
|
||||
* @param non-empty-string $handlerMethod
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly HttpMethod $method,
|
||||
public readonly string $path,
|
||||
public readonly string $handlerClass,
|
||||
public readonly string $handlerMethod,
|
||||
public HttpMethod $method,
|
||||
public string $path,
|
||||
public string $handlerClass,
|
||||
public string $handlerMethod,
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ namespace Lubian\AttributeMagic\Infrastructure\WebApp\Route;
|
|||
use Lubian\AttributeMagic\Infrastructure\Event\AsListener;
|
||||
use Lubian\AttributeMagic\Infrastructure\Finder;
|
||||
|
||||
final class AttributeRouteCollector
|
||||
final readonly class AttributeRouteCollector
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Finder $finder
|
||||
private Finder $finder
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ use Symfony\Component\HttpFoundation\Response;
|
|||
use function ob_get_clean;
|
||||
use function ob_start;
|
||||
|
||||
final class HandlerCaller
|
||||
final readonly class HandlerCaller
|
||||
{
|
||||
public function __construct(
|
||||
private readonly InvokerInterface $invoker
|
||||
private InvokerInterface $invoker
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@ use Symfony\Component\HttpFoundation\Response;
|
|||
|
||||
use function FastRoute\cachedDispatcher;
|
||||
|
||||
final class HandlerResolver
|
||||
final readonly class HandlerResolver
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Dispatcher $dispatcher,
|
||||
private readonly bool $cached = false,
|
||||
private Dispatcher $dispatcher,
|
||||
private bool $cached = false,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue