Skip to content

Commit

Permalink
minor(cs): fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Mar 6, 2024
1 parent 1b28cfa commit 3a36b84
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 45 deletions.
4 changes: 2 additions & 2 deletions src/Adapter/Symfony/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ public function __construct(private SerializerInterface $serializer)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function serialize(mixed $data, string $format, array $context = []): string
{
return $this->serializer->serialize($data, $format, ContextConverter::toSerializationContext($context));
}

/**
* {@inheritdoc}
* {@inheritDoc}
*
* @phpstan-param string $type
* @phpstan-param string $format
Expand Down
2 changes: 1 addition & 1 deletion src/Bundle/DependencyInjection/SerializerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
final class SerializerExtension extends Extension
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/TraceableSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function deserialize(mixed $data, Type $type, string $format, Deserializa
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function normalize(mixed $data, SerializationContext|null $context = null): array
{
Expand All @@ -82,7 +82,7 @@ public function normalize(mixed $data, SerializationContext|null $context = null
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function denormalize(array $data, Type $type, DeserializationContext|null $context = null): mixed
{
Expand Down
2 changes: 1 addition & 1 deletion src/DeserializeGraphNavigator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(MetadataFactoryInterface $metadataFactory, HandlerRe
}

/**
* {@inheritdoc}
* {@inheritDoc}
*
* @param DeserializationContext $context
*/
Expand Down
4 changes: 2 additions & 2 deletions src/GenericDeserializationVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class GenericDeserializationVisitor extends GenericSerializationVisitor
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function visitHash(mixed $data, Type $type, Context $context): array
{
Expand Down Expand Up @@ -77,7 +77,7 @@ public function visitHash(mixed $data, Type $type, Context $context): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function visitArray(mixed $data, Type $type, Context $context): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/GenericSerializationVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function visitHash(mixed $data, Type $type, Context $context): mixed
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function visitArray(mixed $data, Type $type, Context $context): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/ArrayCollectionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class ArrayCollectionHandler implements SubscribingHandlerInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/ConstraintViolationHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class ConstraintViolationHandler implements SubscribingHandlerInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/DateHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DateHandler implements SubscribingHandlerInterface
private DateTimeZone $defaultTimezone;

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/FormErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class FormErrorHandler implements SubscribingHandlerInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/HandlerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function registerSubscribingHandler(SubscribingHandlerInterface $handler)
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function registerHandler(int $direction, string $typeName, $handler): HandlerRegistryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/PhpCollectionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class PhpCollectionHandler implements SubscribingHandlerInterface
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Handler/UuidInterfaceHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UuidInterfaceHandler implements SubscribingHandlerInterface
];

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribingMethods(): iterable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/AdditionalPropertyMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class AdditionalPropertyMetadata extends PropertyMetadata
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __construct(string $class, string $name)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Loader/XmlLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function isExcluded(ReflectionClass $class): bool
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getClassAnnotations(ClassMetadata $classMetadata): array
{
Expand Down Expand Up @@ -160,7 +160,7 @@ protected function getClassAnnotations(ClassMetadata $classMetadata): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getMethodAnnotations(ReflectionMethod $method): array
{
Expand Down Expand Up @@ -189,7 +189,7 @@ protected function getMethodAnnotations(ReflectionMethod $method): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getPropertyAnnotations(ReflectionProperty $property): array
{
Expand Down
6 changes: 3 additions & 3 deletions src/Metadata/Loader/YamlLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function isExcluded(ReflectionClass $class): bool
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getClassAnnotations(ClassMetadata $classMetadata): array
{
Expand Down Expand Up @@ -111,7 +111,7 @@ protected function getClassAnnotations(ClassMetadata $classMetadata): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getMethodAnnotations(ReflectionMethod $method): array
{
Expand All @@ -131,7 +131,7 @@ protected function getMethodAnnotations(ReflectionMethod $method): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getPropertyAnnotations(ReflectionProperty $property): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/PropertyMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class PropertyMetadata extends BasePropertyMetadata
public string $accessorType = self::ACCESS_TYPE_PUBLIC_METHOD;

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __construct(string $class, string $name)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Metadata/StaticPropertyMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class StaticPropertyMetadata extends PropertyMetadata
private mixed $value;

/**
* {@inheritdoc}
* {@inheritDoc}
*
* @param mixed $fieldValue
*/
Expand Down Expand Up @@ -44,7 +44,7 @@ public function __wakeup(): void
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __sleep(): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/VirtualPropertyMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class VirtualPropertyMetadata extends PropertyMetadata
{
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function __construct(string $class, string $methodName)
{
Expand Down
2 changes: 1 addition & 1 deletion src/SerializationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function initialize(
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function createChildContext(array $attributes = []): self
{
Expand Down
2 changes: 1 addition & 1 deletion src/SerializeGraphNavigator.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class SerializeGraphNavigator extends GraphNavigator
{
/**
* {@inheritdoc}
* {@inheritDoc}
*
* @param SerializationContext $context
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function deserialize(mixed $data, Type $type, string $format, Deserializa
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function normalize($data, SerializationContext|null $context = null): array
{
Expand All @@ -79,7 +79,7 @@ public function normalize($data, SerializationContext|null $context = null): arr
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function denormalize(array $data, Type $type, DeserializationContext|null $context = null): mixed
{
Expand Down
2 changes: 2 additions & 0 deletions src/SerializerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
use Psr\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface as SymfonyEventDispatcher;

use function class_exists;

/**
* Builder for serializer instances.
*
Expand Down
6 changes: 3 additions & 3 deletions src/Type/Parser/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class Lexer extends AbstractLexer
public const T_IDENTIFIER = 100;

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getCatchablePatterns(): array
{
Expand All @@ -32,7 +32,7 @@ protected function getCatchablePatterns(): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getNonCatchablePatterns(): array
{
Expand All @@ -43,7 +43,7 @@ protected function getNonCatchablePatterns(): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function getType(&$value): int

Check failure on line 48 in src/Type/Parser/Lexer.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Kcs\Serializer\Type\Parser\Lexer::getType() has parameter $value with no type specified.

Check failure on line 48 in src/Type/Parser/Lexer.php

View workflow job for this annotation

GitHub Actions / Static analysis

Method Kcs\Serializer\Type\Parser\Lexer::getType() has parameter $value with no type specified.
{
Expand Down
4 changes: 2 additions & 2 deletions src/XmlDeserializationVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function prepare(mixed $data): SimpleXMLElement
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function visitHash(mixed $data, Type $type, Context $context): array
{
Expand Down Expand Up @@ -129,7 +129,7 @@ public function visitHash(mixed $data, Type $type, Context $context): array
}

/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function visitArray(mixed $data, Type $type, Context $context): array
{
Expand Down

0 comments on commit 3a36b84

Please sign in to comment.