Skip to content

Commit

Permalink
chore: fix code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Aug 30, 2024
1 parent a967de6 commit 5edd1cc
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lib/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function getAttributeMetadata(string $name): MetadataInterface
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getAttributesMetadata(): array
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Factory/AbstractMetadataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function setMetadataFor(string $className, ClassMetadataInterface $class)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getMetadataFor($value): ClassMetadataInterface
{
Expand Down Expand Up @@ -96,7 +96,7 @@ public function getMetadataFor($value): ClassMetadataInterface
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function hasMetadataFor($value): bool
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Loader/AnnotationProcessorLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ public function setReader(Reader $reader): void
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getClassDescriptors(ReflectionClass $reflectionClass): array
{
return $this->reader->getClassAnnotations($reflectionClass);
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): array
{
return $this->reader->getMethodAnnotations($reflectionMethod);
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getPropertyDescriptors(ReflectionProperty $reflectionProperty): array
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Loader/AttributesProcessorLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ public function __construct(ProcessorFactoryInterface $processorFactory)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getClassDescriptors(ReflectionClass $reflectionClass): array
{
return array_map(static fn (ReflectionAttribute $attribute) => $attribute->newInstance(), $reflectionClass->getAttributes());
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getMethodDescriptors(ReflectionMethod $reflectionMethod): array
{
return array_map(static fn (ReflectionAttribute $attribute) => $attribute->newInstance(), $reflectionMethod->getAttributes());
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getPropertyDescriptors(ReflectionProperty $reflectionProperty): array
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Loader/FilesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class FilesLoader extends ChainLoader
{
/**
* {@inheritdoc}
* {@inheritDoc}
*
* @phpstan-param class-string<LoaderInterface>|null $loaderClass
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Loader/Locator/FinderFileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class FinderFileLocator implements FileLocatorInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function locate(string $basePath, string $extension): array
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Loader/Locator/IteratorFileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class IteratorFileLocator implements FileLocatorInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function locate(string $basePath, string $extension): array
{
Expand Down
2 changes: 1 addition & 1 deletion lib/MetadataPropertiesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
trait MetadataPropertiesTrait
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __sleep(): array
{
Expand Down
2 changes: 1 addition & 1 deletion lib/NullMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function getName(): string
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __sleep(): array
{
Expand Down
6 changes: 5 additions & 1 deletion tests/Loader/Processor/ProcessorFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 5edd1cc

Please sign in to comment.