diff --git a/composer.json b/composer.json index 1a4398f..4282077 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "csfix": "vendor/bin/phpcbf --standard=Solido lib/" }, "require-dev": { - "doctrine/annotations": "~1.2", + "doctrine/annotations": "^1.2 | ^2.0", "doctrine/cache": "^1.4", "kcs/class-finder": "^0.2 | ^0.3 | ^1.0@dev", "phpspec/prophecy-phpunit": "^2.0", diff --git a/lib/ClassMetadata.php b/lib/ClassMetadata.php index 8c1e970..d309ea5 100644 --- a/lib/ClassMetadata.php +++ b/lib/ClassMetadata.php @@ -96,7 +96,7 @@ public function getAttributeMetadata(string $name): MetadataInterface } /** - * {@inheritdoc} + * {@inheritDoc} */ public function getAttributesMetadata(): array { diff --git a/lib/Exception/InvalidArgumentException.php b/lib/Exception/InvalidArgumentException.php index 77c295c..622c354 100644 --- a/lib/Exception/InvalidArgumentException.php +++ b/lib/Exception/InvalidArgumentException.php @@ -21,7 +21,7 @@ class InvalidArgumentException extends \InvalidArgumentException public const INVALID_PROCESSOR_INTERFACE_CLASS = 5; /** - * {@inheritdoc} + * {@inheritDoc} */ final public function __construct(string $message = '', int $code = 0, Throwable|null $previous = null) { diff --git a/lib/Factory/AbstractMetadataFactory.php b/lib/Factory/AbstractMetadataFactory.php index 5b2ffa5..40041c1 100644 --- a/lib/Factory/AbstractMetadataFactory.php +++ b/lib/Factory/AbstractMetadataFactory.php @@ -46,7 +46,7 @@ public function setMetadataFor(string $className, ClassMetadataInterface $class) } /** - * {@inheritdoc} + * {@inheritDoc} */ public function getMetadataFor($value): ClassMetadataInterface { @@ -96,7 +96,7 @@ public function getMetadataFor($value): ClassMetadataInterface } /** - * {@inheritdoc} + * {@inheritDoc} */ public function hasMetadataFor($value): bool { diff --git a/lib/Loader/AnnotationProcessorLoader.php b/lib/Loader/AnnotationProcessorLoader.php index ba6b3b8..9a5def1 100644 --- a/lib/Loader/AnnotationProcessorLoader.php +++ b/lib/Loader/AnnotationProcessorLoader.php @@ -22,7 +22,7 @@ public function setReader(Reader $reader): void } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getClassDescriptors(ReflectionClass $reflectionClass): array { @@ -30,7 +30,7 @@ protected function getClassDescriptors(ReflectionClass $reflectionClass): array } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): array { @@ -38,7 +38,7 @@ protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): arr } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getPropertyDescriptors(ReflectionProperty $reflectionProperty): array { diff --git a/lib/Loader/AttributesProcessorLoader.php b/lib/Loader/AttributesProcessorLoader.php index e990655..460618f 100644 --- a/lib/Loader/AttributesProcessorLoader.php +++ b/lib/Loader/AttributesProcessorLoader.php @@ -27,7 +27,7 @@ public function __construct(ProcessorFactoryInterface $processorFactory) } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getClassDescriptors(ReflectionClass $reflectionClass): array { @@ -35,7 +35,7 @@ protected function getClassDescriptors(ReflectionClass $reflectionClass): array } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): array { @@ -43,7 +43,7 @@ protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): arr } /** - * {@inheritdoc} + * {@inheritDoc} */ protected function getPropertyDescriptors(ReflectionProperty $reflectionProperty): array { diff --git a/lib/Loader/FilesLoader.php b/lib/Loader/FilesLoader.php index b117734..402a276 100644 --- a/lib/Loader/FilesLoader.php +++ b/lib/Loader/FilesLoader.php @@ -9,7 +9,7 @@ class FilesLoader extends ChainLoader { /** - * {@inheritdoc} + * {@inheritDoc} * * @phpstan-param class-string|null $loaderClass */ diff --git a/lib/Loader/Locator/FinderFileLocator.php b/lib/Loader/Locator/FinderFileLocator.php index 04cf7a0..3231d5e 100644 --- a/lib/Loader/Locator/FinderFileLocator.php +++ b/lib/Loader/Locator/FinderFileLocator.php @@ -14,7 +14,7 @@ class FinderFileLocator implements FileLocatorInterface { /** - * {@inheritdoc} + * {@inheritDoc} */ public function locate(string $basePath, string $extension): array { diff --git a/lib/Loader/Locator/IteratorFileLocator.php b/lib/Loader/Locator/IteratorFileLocator.php index b86c556..bdcd29d 100644 --- a/lib/Loader/Locator/IteratorFileLocator.php +++ b/lib/Loader/Locator/IteratorFileLocator.php @@ -18,7 +18,7 @@ class IteratorFileLocator implements FileLocatorInterface { /** - * {@inheritdoc} + * {@inheritDoc} */ public function locate(string $basePath, string $extension): array { diff --git a/lib/MetadataPropertiesTrait.php b/lib/MetadataPropertiesTrait.php index 314245e..ed3f43b 100644 --- a/lib/MetadataPropertiesTrait.php +++ b/lib/MetadataPropertiesTrait.php @@ -12,7 +12,7 @@ trait MetadataPropertiesTrait { /** - * {@inheritdoc} + * {@inheritDoc} */ public function __sleep(): array { diff --git a/lib/NullMetadata.php b/lib/NullMetadata.php index 38a0b6d..28b63e8 100644 --- a/lib/NullMetadata.php +++ b/lib/NullMetadata.php @@ -23,7 +23,7 @@ public function getName(): string } /** - * {@inheritdoc} + * {@inheritDoc} */ public function __sleep(): array { diff --git a/tests/Loader/Processor/ProcessorFactoryTest.php b/tests/Loader/Processor/ProcessorFactoryTest.php index 9ae5048..089bd86 100644 --- a/tests/Loader/Processor/ProcessorFactoryTest.php +++ b/tests/Loader/Processor/ProcessorFactoryTest.php @@ -15,7 +15,11 @@ use Kcs\Metadata\Tests\Fixtures\AnnotationProcessorLoader\Processor\ClassAttribProcessor; use PHPUnit\Framework\TestCase; -AnnotationRegistry::registerLoader('class_exists'); +use function method_exists; + +if (method_exists(AnnotationRegistry::class, 'registerLoader')) { + AnnotationRegistry::registerLoader('class_exists'); +} class FakeProcessor implements ProcessorInterface {