[rector] update dependencies

[CI SKIP]
This commit is contained in:
lubiana 2023-01-25 21:40:46 +00:00 committed by gitbot
parent 92c4da5217
commit 5bd1eae4d2
No known key found for this signature in database
9 changed files with 28 additions and 30 deletions

View file

@ -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,
) {
}

View file

@ -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,
) {
}
}

View file

@ -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
) {
}

View file

@ -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,
) {
}
}

View file

@ -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,
) {
}
}

View file

@ -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,
) {
}
}

View file

@ -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
) {
}

View file

@ -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
) {
}

View file

@ -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,
) {
}