diff --git a/phpcs.xml b/phpcs.xml index e3e0e9c7..56f58c23 100755 --- a/phpcs.xml +++ b/phpcs.xml @@ -18,6 +18,8 @@ src tests */tests/tmp/* + */src/Annotation/* + */src/Inject/* diff --git a/src/Annotation/DefaultSchemeHost.php b/src/Annotation/DefaultSchemeHost.php index 820bd17f..9379bc51 100644 --- a/src/Annotation/DefaultSchemeHost.php +++ b/src/Annotation/DefaultSchemeHost.php @@ -4,6 +4,7 @@ namespace BEAR\Sunday\Annotation; +use Attribute; use Ray\Di\Di\Qualifier; /** @@ -11,6 +12,7 @@ * @Target("METHOD") * @Qualifier */ +#[Attribute(Attribute::TARGET_METHOD), Qualifier] final class DefaultSchemeHost { /** @var string */ diff --git a/src/Inject/PsrLoggerInject.php b/src/Inject/PsrLoggerInject.php index 619b8efa..4b8c5f34 100644 --- a/src/Inject/PsrLoggerInject.php +++ b/src/Inject/PsrLoggerInject.php @@ -5,6 +5,7 @@ namespace BEAR\Sunday\Inject; use Psr\Log\LoggerInterface; +use Ray\Di\Di\Inject; trait PsrLoggerInject { @@ -15,6 +16,7 @@ trait PsrLoggerInject * @\Ray\Di\Di\Inject * @codeCoverageIgnore */ + #[Inject] public function setPsrLogger(LoggerInterface $logger): void { $this->logger = $logger; diff --git a/src/Inject/ResourceInject.php b/src/Inject/ResourceInject.php index 3149fa2b..75c56839 100644 --- a/src/Inject/ResourceInject.php +++ b/src/Inject/ResourceInject.php @@ -5,6 +5,7 @@ namespace BEAR\Sunday\Inject; use BEAR\Resource\ResourceInterface; +use Ray\Di\Di\Inject; trait ResourceInject { @@ -15,6 +16,7 @@ trait ResourceInject * @\Ray\Di\Di\Inject * @codeCoverageIgnore */ + #[Inject] public function setResource(ResourceInterface $resource): void { $this->resource = $resource;