From edec44c921d1399c6656459acb72a13d633d119b Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Mon, 11 Jan 2021 08:34:34 +0100 Subject: [PATCH] Enable RequireOneLinePropertyDocComment sniff --- phpcs.xml.dist | 2 - src/AbstractVisitor.php | 4 +- src/Accessor/DefaultAccessorStrategy.php | 16 +--- src/Annotation/Accessor.php | 8 +- src/Annotation/AccessorOrder.php | 4 +- src/Annotation/Exclude.php | 4 +- src/Annotation/ExclusionPolicy.php | 4 +- src/Annotation/Expose.php | 4 +- src/Annotation/ReadOnly.php | 4 +- src/Annotation/SerializedName.php | 4 +- src/Annotation/VirtualProperty.php | 12 +-- src/Annotation/XmlAttribute.php | 4 +- src/Annotation/XmlCollection.php | 16 +--- src/Annotation/XmlDiscriminator.php | 12 +-- src/Annotation/XmlElement.php | 8 +- src/Annotation/XmlMap.php | 4 +- src/Annotation/XmlNamespace.php | 4 +- src/Annotation/XmlRoot.php | 8 +- src/Annotation/XmlValue.php | 4 +- src/Builder/CallbackDriverFactory.php | 4 +- src/Builder/DefaultDriverFactory.php | 12 +-- .../DoctrineObjectConstructor.php | 16 +--- src/Context.php | 24 ++--- src/ContextFactory/CallableContextFactory.php | 4 +- src/DeserializationContext.php | 4 +- src/EventDispatcher/Event.php | 12 +-- src/EventDispatcher/EventDispatcher.php | 4 +- src/EventDispatcher/LazyEventDispatcher.php | 4 +- src/EventDispatcher/ObjectEvent.php | 4 +- src/EventDispatcher/PreDeserializeEvent.php | 4 +- .../Subscriber/DoctrineProxySubscriber.php | 8 +- .../SymfonyValidatorValidatorSubscriber.php | 4 +- src/Exception/ValidationFailedException.php | 4 +- src/Exception/XmlErrorException.php | 4 +- src/Exclusion/DisjunctExclusionStrategy.php | 4 +- .../ExpressionLanguageExclusionStrategy.php | 4 +- src/Exclusion/GroupsExclusionStrategy.php | 8 +- src/Exclusion/VersionExclusionStrategy.php | 4 +- src/Expression/Expression.php | 4 +- src/Expression/ExpressionEvaluator.php | 8 +- src/GraphNavigator.php | 16 +--- .../DeserializationGraphNavigator.php | 32 ++----- .../DeserializationGraphNavigatorFactory.php | 24 ++--- .../SerializationGraphNavigatorFactory.php | 20 +--- .../SerializationGraphNavigator.php | 32 ++----- src/Handler/ArrayCollectionHandler.php | 4 +- src/Handler/DateHandler.php | 12 +-- src/Handler/FormErrorHandler.php | 8 +- src/Handler/HandlerRegistry.php | 4 +- src/Handler/LazyHandlerRegistry.php | 8 +- src/JsonDeserializationVisitor.php | 16 +--- src/JsonSerializationVisitor.php | 12 +-- src/Metadata/ClassMetadata.php | 64 ++++--------- .../Driver/AbstractDoctrineTypeDriver.php | 12 +-- src/Metadata/Driver/AnnotationDriver.php | 12 +-- src/Metadata/Driver/DocBlockDriver.php | 12 +-- src/Metadata/Driver/DocBlockDriverFactory.php | 8 +- src/Metadata/Driver/DocBlockTypeResolver.php | 8 +- .../Driver/ExpressionMetadataTrait.php | 4 +- src/Metadata/Driver/TypedPropertiesDriver.php | 12 +-- src/Metadata/Driver/XmlDriver.php | 8 +- src/Metadata/Driver/YamlDriver.php | 12 +-- src/Metadata/ExpressionPropertyMetadata.php | 4 +- src/Metadata/PropertyMetadata.php | 96 +++++-------------- src/Metadata/StaticPropertyMetadata.php | 4 +- src/Naming/CamelCaseNamingStrategy.php | 8 +- .../SerializedNameAnnotationStrategy.php | 4 +- src/SerializationContext.php | 8 +- src/Serializer.php | 28 ++---- src/SerializerBuilder.php | 88 +++++------------ src/Twig/SerializerExtension.php | 4 +- src/Twig/SerializerRuntimeHelper.php | 4 +- src/Type/Parser.php | 8 +- .../JsonDeserializationVisitorFactory.php | 8 +- .../JsonSerializationVisitorFactory.php | 4 +- .../XmlDeserializationVisitorFactory.php | 12 +-- .../XmlSerializationVisitorFactory.php | 20 +--- src/XmlDeserializationVisitor.php | 32 ++----- src/XmlSerializationVisitor.php | 44 +++------ tests/Expression/ExpressionEvaluatorTest.php | 4 +- tests/Fixtures/AllExcludedObject.php | 4 +- tests/Fixtures/AuthorExpressionAccess.php | 8 +- .../AuthorExpressionAccessContext.php | 4 +- tests/Fixtures/BlogPost.php | 4 +- tests/Fixtures/Comment.php | 8 +- .../Fixtures/CustomDeserializationObject.php | 4 +- ...lectionOfClassesFromDifferentNamespace.php | 4 +- ...sFromDifferentNamespaceUsingGroupAlias.php | 8 +- ...FromDifferentNamespaceUsingSingleAlias.php | 4 +- ...CollectionOfClassesFromGlobalNamespace.php | 4 +- .../CollectionOfClassesFromSameNamespace.php | 4 +- ...llectionOfClassesWithFullNamespacePath.php | 4 +- .../CollectionOfClassesWithNull.php | 4 +- ...tionOfInterfacesFromDifferentNamespace.php | 4 +- ...ollectionOfInterfacesFromSameNamespace.php | 4 +- ...ctionOfInterfacesWithFullNamespacePath.php | 4 +- .../CollectionOfNotExistingClasses.php | 4 +- .../Collection/CollectionOfScalars.php | 4 +- .../Collection/CollectionOfUnionClasses.php | 4 +- .../CollectionTypedAsGenericClass.php | 4 +- .../Collection/Details/ProductDescription.php | 4 +- .../Details/WithProductDescriptionTrait.php | 4 +- .../Collection/MapTypedAsGenericClass.php | 4 +- .../Collection/WithProductNameTrait.php | 4 +- ...gleClassFromDifferentNamespaceTypeHint.php | 4 +- ...SingleClassFromGlobalNamespaceTypeHint.php | 4 +- .../Embeddable/BlogPostWithEmbedded.php | 4 +- tests/Fixtures/Doctrine/Entity/BlogPost.php | 8 +- tests/Fixtures/Doctrine/Entity/Comment.php | 12 +-- tests/Fixtures/DoctrinePHPCR/Author.php | 4 +- tests/Fixtures/DoctrinePHPCR/BlogPost.php | 8 +- tests/Fixtures/DoctrinePHPCR/Comment.php | 12 +-- tests/Fixtures/ExcludePublicAccessor.php | 4 +- tests/Fixtures/Garage.php | 4 +- tests/Fixtures/GetSetObject.php | 4 +- tests/Fixtures/GroupsObject.php | 4 +- tests/Fixtures/GroupsTrim.php | 8 +- tests/Fixtures/GroupsUser.php | 12 +-- tests/Fixtures/InlineChild.php | 8 +- tests/Fixtures/InlineParent.php | 8 +- tests/Fixtures/InlineParentWithEmptyChild.php | 8 +- tests/Fixtures/Input.php | 4 +- tests/Fixtures/MaxDepth/Gh236Bar.php | 4 +- tests/Fixtures/MaxDepth/Gh236Foo.php | 4 +- tests/Fixtures/MultilineGroupsFormat.php | 8 +- tests/Fixtures/Node.php | 4 +- .../Fixtures/ObjectWithEmptyArrayAndHash.php | 4 +- .../Fixtures/ObjectWithInvalidExpression.php | 8 +- .../Fixtures/ObjectWithLifecycleCallbacks.php | 12 +-- tests/Fixtures/ObjectWithObjectProperty.php | 8 +- .../Fixtures/ObjectWithVirtualProperties.php | 4 +- tests/Fixtures/ObjectWithXmlRootNamespace.php | 8 +- .../ParentDoNotSkipWithEmptyChild.php | 4 +- tests/Fixtures/PersonAccount.php | 8 +- tests/Fixtures/PersonAccountOnParent.php | 4 +- .../PersonAccountParentWithExclude.php | 4 +- tests/Fixtures/PersonAccountWithParent.php | 8 +- tests/Fixtures/PersonCollection.php | 4 +- tests/Fixtures/PersonLocation.php | 8 +- tests/Fixtures/PersonSecret.php | 4 +- tests/Fixtures/PersonSecretVirtual.php | 8 +- tests/Fixtures/PersonSecretWithVariables.php | 4 +- tests/Fixtures/Timestamp.php | 4 +- tests/Fixtures/Tree.php | 4 +- tests/Fixtures/TypedProperties/User.php | 8 +- tests/Fixtures/VehicleInterfaceGarage.php | 4 +- tests/Fixtures/VersionedObject.php | 4 +- tests/Handler/ArrayCollectionDepthTest.php | 4 +- tests/Handler/DateHandlerTest.php | 8 +- tests/Handler/FormErrorHandlerTest.php | 16 +--- tests/Handler/IteratorHandlerTest.php | 4 +- tests/Serializer/BaseSerializationTest.php | 8 +- .../EventDispatcher/EventDispatcherTest.php | 4 +- .../DoctrineProxySubscriberTest.php | 4 +- 154 files changed, 352 insertions(+), 1058 deletions(-) diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 26031d5b9..e1586abf1 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -29,8 +29,6 @@ - - diff --git a/src/AbstractVisitor.php b/src/AbstractVisitor.php index 76e00bc7e..513e4a1e6 100644 --- a/src/AbstractVisitor.php +++ b/src/AbstractVisitor.php @@ -9,9 +9,7 @@ */ abstract class AbstractVisitor implements VisitorInterface { - /** - * @var GraphNavigatorInterface - */ + /** @var GraphNavigatorInterface */ protected $navigator; public function setNavigator(GraphNavigatorInterface $navigator): void diff --git a/src/Accessor/DefaultAccessorStrategy.php b/src/Accessor/DefaultAccessorStrategy.php index c3e45d819..e956400dc 100644 --- a/src/Accessor/DefaultAccessorStrategy.php +++ b/src/Accessor/DefaultAccessorStrategy.php @@ -20,24 +20,16 @@ */ final class DefaultAccessorStrategy implements AccessorStrategyInterface { - /** - * @var callable[] - */ + /** @var callable[] */ private $readAccessors = []; - /** - * @var callable[] - */ + /** @var callable[] */ private $writeAccessors = []; - /** - * @var \ReflectionProperty[] - */ + /** @var \ReflectionProperty[] */ private $propertyReflectionCache = []; - /** - * @var ExpressionEvaluatorInterface - */ + /** @var ExpressionEvaluatorInterface */ private $evaluator; public function __construct(?ExpressionEvaluatorInterface $evaluator = null) diff --git a/src/Annotation/Accessor.php b/src/Annotation/Accessor.php index a3f331467..6d329add1 100644 --- a/src/Annotation/Accessor.php +++ b/src/Annotation/Accessor.php @@ -12,13 +12,9 @@ */ final class Accessor { - /** - * @var string - */ + /** @var string */ public $getter; - /** - * @var string - */ + /** @var string */ public $setter; } diff --git a/src/Annotation/AccessorOrder.php b/src/Annotation/AccessorOrder.php index 04dd64dc9..971d0c055 100644 --- a/src/Annotation/AccessorOrder.php +++ b/src/Annotation/AccessorOrder.php @@ -20,8 +20,6 @@ final class AccessorOrder */ public $order; - /** - * @var array - */ + /** @var array */ public $custom = []; } diff --git a/src/Annotation/Exclude.php b/src/Annotation/Exclude.php index ff7fd7509..5cd9114db 100644 --- a/src/Annotation/Exclude.php +++ b/src/Annotation/Exclude.php @@ -10,8 +10,6 @@ */ final class Exclude { - /** - * @var string - */ + /** @var string */ public $if; } diff --git a/src/Annotation/ExclusionPolicy.php b/src/Annotation/ExclusionPolicy.php index 51f77c449..a4bacbcbf 100644 --- a/src/Annotation/ExclusionPolicy.php +++ b/src/Annotation/ExclusionPolicy.php @@ -15,9 +15,7 @@ final class ExclusionPolicy public const NONE = 'NONE'; public const ALL = 'ALL'; - /** - * @var string - */ + /** @var string */ public $policy; public function __construct(array $values) diff --git a/src/Annotation/Expose.php b/src/Annotation/Expose.php index ec6218281..6cfad066f 100644 --- a/src/Annotation/Expose.php +++ b/src/Annotation/Expose.php @@ -10,8 +10,6 @@ */ final class Expose { - /** - * @var string - */ + /** @var string */ public $if; } diff --git a/src/Annotation/ReadOnly.php b/src/Annotation/ReadOnly.php index 9e0336b86..8f2512403 100644 --- a/src/Annotation/ReadOnly.php +++ b/src/Annotation/ReadOnly.php @@ -10,8 +10,6 @@ */ final class ReadOnly { - /** - * @var bool - */ + /** @var bool */ public $readOnly = true; } diff --git a/src/Annotation/SerializedName.php b/src/Annotation/SerializedName.php index 28e671fc6..9298d8f12 100644 --- a/src/Annotation/SerializedName.php +++ b/src/Annotation/SerializedName.php @@ -12,9 +12,7 @@ */ final class SerializedName { - /** - * @var string - */ + /** @var string */ public $name; public function __construct(array $values) diff --git a/src/Annotation/VirtualProperty.php b/src/Annotation/VirtualProperty.php index 56e554789..5e22ba50a 100644 --- a/src/Annotation/VirtualProperty.php +++ b/src/Annotation/VirtualProperty.php @@ -14,19 +14,13 @@ */ final class VirtualProperty { - /** - * @var string - */ + /** @var string */ public $exp; - /** - * @var string - */ + /** @var string */ public $name; - /** - * @var array - */ + /** @var array */ public $options = []; public function __construct(array $data) diff --git a/src/Annotation/XmlAttribute.php b/src/Annotation/XmlAttribute.php index ca77b5323..678e6f71e 100644 --- a/src/Annotation/XmlAttribute.php +++ b/src/Annotation/XmlAttribute.php @@ -10,8 +10,6 @@ */ final class XmlAttribute { - /** - * @var string - */ + /** @var string */ public $namespace; } diff --git a/src/Annotation/XmlCollection.php b/src/Annotation/XmlCollection.php index 4d7d93831..763344c79 100644 --- a/src/Annotation/XmlCollection.php +++ b/src/Annotation/XmlCollection.php @@ -6,23 +6,15 @@ abstract class XmlCollection { - /** - * @var string - */ + /** @var string */ public $entry = 'entry'; - /** - * @var bool - */ + /** @var bool */ public $inline = false; - /** - * @var string - */ + /** @var string */ public $namespace; - /** - * @var bool - */ + /** @var bool */ public $skipWhenEmpty = true; } diff --git a/src/Annotation/XmlDiscriminator.php b/src/Annotation/XmlDiscriminator.php index 123fc55b4..36b86a4ab 100644 --- a/src/Annotation/XmlDiscriminator.php +++ b/src/Annotation/XmlDiscriminator.php @@ -10,18 +10,12 @@ */ class XmlDiscriminator { - /** - * @var bool - */ + /** @var bool */ public $attribute = false; - /** - * @var bool - */ + /** @var bool */ public $cdata = true; - /** - * @var string - */ + /** @var string */ public $namespace; } diff --git a/src/Annotation/XmlElement.php b/src/Annotation/XmlElement.php index 74aebc22a..cd9cd24a3 100644 --- a/src/Annotation/XmlElement.php +++ b/src/Annotation/XmlElement.php @@ -10,13 +10,9 @@ */ final class XmlElement { - /** - * @var bool - */ + /** @var bool */ public $cdata = true; - /** - * @var string - */ + /** @var string */ public $namespace; } diff --git a/src/Annotation/XmlMap.php b/src/Annotation/XmlMap.php index 3c043b597..a102ecd43 100644 --- a/src/Annotation/XmlMap.php +++ b/src/Annotation/XmlMap.php @@ -10,8 +10,6 @@ */ final class XmlMap extends XmlCollection { - /** - * @var string - */ + /** @var string */ public $keyAttribute = '_key'; } diff --git a/src/Annotation/XmlNamespace.php b/src/Annotation/XmlNamespace.php index bec56e610..12a7e0892 100644 --- a/src/Annotation/XmlNamespace.php +++ b/src/Annotation/XmlNamespace.php @@ -16,8 +16,6 @@ final class XmlNamespace */ public $uri; - /** - * @var string - */ + /** @var string */ public $prefix = ''; } diff --git a/src/Annotation/XmlRoot.php b/src/Annotation/XmlRoot.php index a71d67308..47036dbf0 100644 --- a/src/Annotation/XmlRoot.php +++ b/src/Annotation/XmlRoot.php @@ -16,13 +16,9 @@ final class XmlRoot */ public $name; - /** - * @var string - */ + /** @var string */ public $namespace; - /** - * @var string - */ + /** @var string */ public $prefix; } diff --git a/src/Annotation/XmlValue.php b/src/Annotation/XmlValue.php index 6b1cd828a..867ee27ee 100644 --- a/src/Annotation/XmlValue.php +++ b/src/Annotation/XmlValue.php @@ -10,8 +10,6 @@ */ final class XmlValue { - /** - * @var bool - */ + /** @var bool */ public $cdata = true; } diff --git a/src/Builder/CallbackDriverFactory.php b/src/Builder/CallbackDriverFactory.php index 1bf2fc913..37d4cc633 100644 --- a/src/Builder/CallbackDriverFactory.php +++ b/src/Builder/CallbackDriverFactory.php @@ -10,9 +10,7 @@ final class CallbackDriverFactory implements DriverFactoryInterface { - /** - * @var callable - */ + /** @var callable */ private $callback; public function __construct(callable $callable) diff --git a/src/Builder/DefaultDriverFactory.php b/src/Builder/DefaultDriverFactory.php index 2e87f3b33..6a02f584a 100644 --- a/src/Builder/DefaultDriverFactory.php +++ b/src/Builder/DefaultDriverFactory.php @@ -19,19 +19,13 @@ final class DefaultDriverFactory implements DriverFactoryInterface { - /** - * @var ParserInterface - */ + /** @var ParserInterface */ private $typeParser; - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $propertyNamingStrategy; - /** - * @var CompilableExpressionEvaluatorInterface - */ + /** @var CompilableExpressionEvaluatorInterface */ private $expressionEvaluator; public function __construct(PropertyNamingStrategyInterface $propertyNamingStrategy, ?ParserInterface $typeParser = null, ?CompilableExpressionEvaluatorInterface $expressionEvaluator = null) diff --git a/src/Construction/DoctrineObjectConstructor.php b/src/Construction/DoctrineObjectConstructor.php index d00305b31..95b509809 100644 --- a/src/Construction/DoctrineObjectConstructor.php +++ b/src/Construction/DoctrineObjectConstructor.php @@ -21,24 +21,16 @@ final class DoctrineObjectConstructor implements ObjectConstructorInterface public const ON_MISSING_NULL = 'null'; public const ON_MISSING_EXCEPTION = 'exception'; public const ON_MISSING_FALLBACK = 'fallback'; - /** - * @var string - */ + /** @var string */ private $fallbackStrategy; - /** - * @var ManagerRegistry - */ + /** @var ManagerRegistry */ private $managerRegistry; - /** - * @var ObjectConstructorInterface - */ + /** @var ObjectConstructorInterface */ private $fallbackConstructor; - /** - * @var ExpressionLanguageExclusionStrategy|null - */ + /** @var ExpressionLanguageExclusionStrategy|null */ private $expressionLanguageExclusionStrategy; /** diff --git a/src/Context.php b/src/Context.php index 36adc2e69..7093f0ba5 100644 --- a/src/Context.php +++ b/src/Context.php @@ -18,37 +18,25 @@ abstract class Context { - /** - * @var array - */ + /** @var array */ private $attributes = []; - /** - * @var string - */ + /** @var string */ private $format; - /** - * @var VisitorInterface - */ + /** @var VisitorInterface */ private $visitor; - /** - * @var GraphNavigatorInterface - */ + /** @var GraphNavigatorInterface */ private $navigator; - /** - * @var MetadataFactory - */ + /** @var MetadataFactory */ private $metadataFactory; /** @var DisjunctExclusionStrategy */ private $exclusionStrategy; - /** - * @var bool - */ + /** @var bool */ private $initialized = false; /** @var \SplStack */ diff --git a/src/ContextFactory/CallableContextFactory.php b/src/ContextFactory/CallableContextFactory.php index 54e1c7ec8..7257f813f 100644 --- a/src/ContextFactory/CallableContextFactory.php +++ b/src/ContextFactory/CallableContextFactory.php @@ -11,9 +11,7 @@ */ abstract class CallableContextFactory { - /** - * @var callable - */ + /** @var callable */ private $callable; public function __construct(callable $callable) diff --git a/src/DeserializationContext.php b/src/DeserializationContext.php index 5c16a24db..1347a571e 100644 --- a/src/DeserializationContext.php +++ b/src/DeserializationContext.php @@ -8,9 +8,7 @@ class DeserializationContext extends Context { - /** - * @var int - */ + /** @var int */ private $depth = 0; public static function create(): self diff --git a/src/EventDispatcher/Event.php b/src/EventDispatcher/Event.php index 27b204085..7c309b07e 100644 --- a/src/EventDispatcher/Event.php +++ b/src/EventDispatcher/Event.php @@ -9,19 +9,13 @@ class Event { - /** - * @var bool Whether no further event listeners should be triggered - */ + /** @var bool Whether no further event listeners should be triggered */ private $propagationStopped = false; - /** - * @var array - */ + /** @var array */ protected $type; - /** - * @var Context - */ + /** @var Context */ private $context; public function __construct(Context $context, array $type) diff --git a/src/EventDispatcher/EventDispatcher.php b/src/EventDispatcher/EventDispatcher.php index 2433eda40..662d321a2 100644 --- a/src/EventDispatcher/EventDispatcher.php +++ b/src/EventDispatcher/EventDispatcher.php @@ -16,9 +16,7 @@ */ class EventDispatcher implements EventDispatcherInterface { - /** - * @var array - */ + /** @var array */ private $listeners = []; /** diff --git a/src/EventDispatcher/LazyEventDispatcher.php b/src/EventDispatcher/LazyEventDispatcher.php index 14e883cb0..c44eff35a 100644 --- a/src/EventDispatcher/LazyEventDispatcher.php +++ b/src/EventDispatcher/LazyEventDispatcher.php @@ -10,9 +10,7 @@ class LazyEventDispatcher extends EventDispatcher { - /** - * @var PsrContainerInterface|ContainerInterface - */ + /** @var PsrContainerInterface|ContainerInterface */ private $container; /** diff --git a/src/EventDispatcher/ObjectEvent.php b/src/EventDispatcher/ObjectEvent.php index 8219dabb6..5c28fa2b5 100644 --- a/src/EventDispatcher/ObjectEvent.php +++ b/src/EventDispatcher/ObjectEvent.php @@ -8,9 +8,7 @@ class ObjectEvent extends Event { - /** - * @var mixed - */ + /** @var mixed */ private $object; /** diff --git a/src/EventDispatcher/PreDeserializeEvent.php b/src/EventDispatcher/PreDeserializeEvent.php index a63c8d98c..3b303eb5f 100644 --- a/src/EventDispatcher/PreDeserializeEvent.php +++ b/src/EventDispatcher/PreDeserializeEvent.php @@ -8,9 +8,7 @@ class PreDeserializeEvent extends Event { - /** - * @var mixed - */ + /** @var mixed */ private $data; /** diff --git a/src/EventDispatcher/Subscriber/DoctrineProxySubscriber.php b/src/EventDispatcher/Subscriber/DoctrineProxySubscriber.php index b39ded887..5f01ba5a0 100644 --- a/src/EventDispatcher/Subscriber/DoctrineProxySubscriber.php +++ b/src/EventDispatcher/Subscriber/DoctrineProxySubscriber.php @@ -16,14 +16,10 @@ final class DoctrineProxySubscriber implements EventSubscriberInterface { - /** - * @var bool - */ + /** @var bool */ private $skipVirtualTypeInit; - /** - * @var bool - */ + /** @var bool */ private $initializeExcluded; public function __construct(bool $skipVirtualTypeInit = true, bool $initializeExcluded = false) diff --git a/src/EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php b/src/EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php index 9950d8f34..cf2ca88e3 100644 --- a/src/EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php +++ b/src/EventDispatcher/Subscriber/SymfonyValidatorValidatorSubscriber.php @@ -11,9 +11,7 @@ final class SymfonyValidatorValidatorSubscriber implements EventSubscriberInterface { - /** - * @var ValidatorInterface - */ + /** @var ValidatorInterface */ private $validator; public function __construct(ValidatorInterface $validator) diff --git a/src/Exception/ValidationFailedException.php b/src/Exception/ValidationFailedException.php index 06e444d48..1f73ce2ac 100644 --- a/src/Exception/ValidationFailedException.php +++ b/src/Exception/ValidationFailedException.php @@ -8,9 +8,7 @@ class ValidationFailedException extends RuntimeException { - /** - * @var ConstraintViolationListInterface - */ + /** @var ConstraintViolationListInterface */ private $list; public function __construct(ConstraintViolationListInterface $list) diff --git a/src/Exception/XmlErrorException.php b/src/Exception/XmlErrorException.php index 674e1594a..7b653bddf 100644 --- a/src/Exception/XmlErrorException.php +++ b/src/Exception/XmlErrorException.php @@ -6,9 +6,7 @@ class XmlErrorException extends RuntimeException { - /** - * @var \LibXMLError - */ + /** @var \LibXMLError */ private $xmlError; public function __construct(\LibXMLError $error) diff --git a/src/Exclusion/DisjunctExclusionStrategy.php b/src/Exclusion/DisjunctExclusionStrategy.php index 7942798bc..034745d52 100644 --- a/src/Exclusion/DisjunctExclusionStrategy.php +++ b/src/Exclusion/DisjunctExclusionStrategy.php @@ -17,9 +17,7 @@ */ final class DisjunctExclusionStrategy implements ExclusionStrategyInterface { - /** - * @var ExclusionStrategyInterface[] - */ + /** @var ExclusionStrategyInterface[] */ private $delegates; /** diff --git a/src/Exclusion/ExpressionLanguageExclusionStrategy.php b/src/Exclusion/ExpressionLanguageExclusionStrategy.php index d15d5af6d..31c79c89c 100644 --- a/src/Exclusion/ExpressionLanguageExclusionStrategy.php +++ b/src/Exclusion/ExpressionLanguageExclusionStrategy.php @@ -22,9 +22,7 @@ */ final class ExpressionLanguageExclusionStrategy { - /** - * @var ExpressionEvaluatorInterface - */ + /** @var ExpressionEvaluatorInterface */ private $expressionEvaluator; public function __construct(ExpressionEvaluatorInterface $expressionEvaluator) diff --git a/src/Exclusion/GroupsExclusionStrategy.php b/src/Exclusion/GroupsExclusionStrategy.php index 8390f6296..6c682669a 100644 --- a/src/Exclusion/GroupsExclusionStrategy.php +++ b/src/Exclusion/GroupsExclusionStrategy.php @@ -12,14 +12,10 @@ final class GroupsExclusionStrategy implements ExclusionStrategyInterface { public const DEFAULT_GROUP = 'Default'; - /** - * @var array - */ + /** @var array */ private $groups = []; - /** - * @var bool - */ + /** @var bool */ private $nestedGroups = false; public function __construct(array $groups) diff --git a/src/Exclusion/VersionExclusionStrategy.php b/src/Exclusion/VersionExclusionStrategy.php index be33ce8b2..b20d5b05b 100644 --- a/src/Exclusion/VersionExclusionStrategy.php +++ b/src/Exclusion/VersionExclusionStrategy.php @@ -10,9 +10,7 @@ final class VersionExclusionStrategy implements ExclusionStrategyInterface { - /** - * @var string - */ + /** @var string */ private $version; public function __construct(string $version) diff --git a/src/Expression/Expression.php b/src/Expression/Expression.php index 3fbf88ebe..cd1d2efff 100644 --- a/src/Expression/Expression.php +++ b/src/Expression/Expression.php @@ -12,9 +12,7 @@ */ class Expression implements \Serializable { - /** - * @var BaseExpression - */ + /** @var BaseExpression */ private $expression; public function __construct(BaseExpression $expression) diff --git a/src/Expression/ExpressionEvaluator.php b/src/Expression/ExpressionEvaluator.php index 95d15f668..49a2187ff 100644 --- a/src/Expression/ExpressionEvaluator.php +++ b/src/Expression/ExpressionEvaluator.php @@ -11,14 +11,10 @@ */ class ExpressionEvaluator implements CompilableExpressionEvaluatorInterface, ExpressionEvaluatorInterface { - /** - * @var ExpressionLanguage - */ + /** @var ExpressionLanguage */ private $expressionLanguage; - /** - * @var array - */ + /** @var array */ private $context; public function __construct(ExpressionLanguage $expressionLanguage, array $context = []) diff --git a/src/GraphNavigator.php b/src/GraphNavigator.php index e393e5680..314a2eafe 100644 --- a/src/GraphNavigator.php +++ b/src/GraphNavigator.php @@ -19,21 +19,13 @@ */ abstract class GraphNavigator implements GraphNavigatorInterface { - /** - * @var VisitorInterface - */ + /** @var VisitorInterface */ protected $visitor; - /** - * @var Context - */ + /** @var Context */ protected $context; - /*** - * @var string - */ + /*** @var string */ protected $format; - /** - * @var ExclusionStrategyInterface - */ + /** @var ExclusionStrategyInterface */ protected $exclusionStrategy; public function initialize(VisitorInterface $visitor, Context $context): void diff --git a/src/GraphNavigator/DeserializationGraphNavigator.php b/src/GraphNavigator/DeserializationGraphNavigator.php index 00889d1da..5712a039e 100644 --- a/src/GraphNavigator/DeserializationGraphNavigator.php +++ b/src/GraphNavigator/DeserializationGraphNavigator.php @@ -36,43 +36,27 @@ */ final class DeserializationGraphNavigator extends GraphNavigator implements GraphNavigatorInterface { - /** - * @var DeserializationVisitorInterface - */ + /** @var DeserializationVisitorInterface */ protected $visitor; - /** - * @var DeserializationContext - */ + /** @var DeserializationContext */ protected $context; - /** - * @var ExpressionLanguageExclusionStrategy - */ + /** @var ExpressionLanguageExclusionStrategy */ private $expressionExclusionStrategy; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ private $dispatcher; - /** - * @var MetadataFactoryInterface - */ + /** @var MetadataFactoryInterface */ private $metadataFactory; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ private $handlerRegistry; - /** - * @var ObjectConstructorInterface - */ + /** @var ObjectConstructorInterface */ private $objectConstructor; - /** - * @var AccessorStrategyInterface - */ + /** @var AccessorStrategyInterface */ private $accessor; public function __construct( diff --git a/src/GraphNavigator/Factory/DeserializationGraphNavigatorFactory.php b/src/GraphNavigator/Factory/DeserializationGraphNavigatorFactory.php index fc66dbbc4..aa35689ee 100644 --- a/src/GraphNavigator/Factory/DeserializationGraphNavigatorFactory.php +++ b/src/GraphNavigator/Factory/DeserializationGraphNavigatorFactory.php @@ -15,29 +15,17 @@ final class DeserializationGraphNavigatorFactory implements GraphNavigatorFactoryInterface { - /** - * @var MetadataFactoryInterface - */ + /** @var MetadataFactoryInterface */ private $metadataFactory; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ private $handlerRegistry; - /** - * @var ObjectConstructorInterface - */ + /** @var ObjectConstructorInterface */ private $objectConstructor; - /** - * @var AccessorStrategyInterface - */ + /** @var AccessorStrategyInterface */ private $accessor; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ private $dispatcher; - /** - * @var ExpressionEvaluatorInterface - */ + /** @var ExpressionEvaluatorInterface */ private $expressionEvaluator; public function __construct( diff --git a/src/GraphNavigator/Factory/SerializationGraphNavigatorFactory.php b/src/GraphNavigator/Factory/SerializationGraphNavigatorFactory.php index dc42589b3..e944fda6a 100644 --- a/src/GraphNavigator/Factory/SerializationGraphNavigatorFactory.php +++ b/src/GraphNavigator/Factory/SerializationGraphNavigatorFactory.php @@ -16,25 +16,15 @@ final class SerializationGraphNavigatorFactory implements GraphNavigatorFactoryInterface { - /** - * @var MetadataFactoryInterface - */ + /** @var MetadataFactoryInterface */ private $metadataFactory; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ private $handlerRegistry; - /** - * @var AccessorStrategyInterface - */ + /** @var AccessorStrategyInterface */ private $accessor; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ private $dispatcher; - /** - * @var ExpressionEvaluatorInterface - */ + /** @var ExpressionEvaluatorInterface */ private $expressionEvaluator; public function __construct( diff --git a/src/GraphNavigator/SerializationGraphNavigator.php b/src/GraphNavigator/SerializationGraphNavigator.php index 31ecd01ba..1f651a2dc 100644 --- a/src/GraphNavigator/SerializationGraphNavigator.php +++ b/src/GraphNavigator/SerializationGraphNavigator.php @@ -39,43 +39,27 @@ */ final class SerializationGraphNavigator extends GraphNavigator implements GraphNavigatorInterface { - /** - * @var SerializationVisitorInterface - */ + /** @var SerializationVisitorInterface */ protected $visitor; - /** - * @var SerializationContext - */ + /** @var SerializationContext */ protected $context; - /** - * @var ExpressionLanguageExclusionStrategy - */ + /** @var ExpressionLanguageExclusionStrategy */ private $expressionExclusionStrategy; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ private $dispatcher; - /** - * @var MetadataFactoryInterface - */ + /** @var MetadataFactoryInterface */ private $metadataFactory; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ private $handlerRegistry; - /** - * @var AccessorStrategyInterface - */ + /** @var AccessorStrategyInterface */ private $accessor; - /** - * @var bool - */ + /** @var bool */ private $shouldSerializeNull; public function __construct( diff --git a/src/Handler/ArrayCollectionHandler.php b/src/Handler/ArrayCollectionHandler.php index ae839bd7f..044e513fe 100644 --- a/src/Handler/ArrayCollectionHandler.php +++ b/src/Handler/ArrayCollectionHandler.php @@ -14,9 +14,7 @@ final class ArrayCollectionHandler implements SubscribingHandlerInterface { - /** - * @var bool - */ + /** @var bool */ private $initializeExcluded; public function __construct(bool $initializeExcluded = true) diff --git a/src/Handler/DateHandler.php b/src/Handler/DateHandler.php index 4f0e74afe..5436a15d3 100644 --- a/src/Handler/DateHandler.php +++ b/src/Handler/DateHandler.php @@ -13,19 +13,13 @@ final class DateHandler implements SubscribingHandlerInterface { - /** - * @var string - */ + /** @var string */ private $defaultFormat; - /** - * @var \DateTimeZone - */ + /** @var \DateTimeZone */ private $defaultTimezone; - /** - * @var bool - */ + /** @var bool */ private $xmlCData; /** diff --git a/src/Handler/FormErrorHandler.php b/src/Handler/FormErrorHandler.php index b5101960b..f0db6feb7 100644 --- a/src/Handler/FormErrorHandler.php +++ b/src/Handler/FormErrorHandler.php @@ -14,14 +14,10 @@ final class FormErrorHandler implements SubscribingHandlerInterface { - /** - * @var TranslatorInterface|null - */ + /** @var TranslatorInterface|null */ private $translator; - /** - * @var string - */ + /** @var string */ private $translationDomain; /** diff --git a/src/Handler/HandlerRegistry.php b/src/Handler/HandlerRegistry.php index bcf97baa3..8ed347ad0 100644 --- a/src/Handler/HandlerRegistry.php +++ b/src/Handler/HandlerRegistry.php @@ -10,9 +10,7 @@ class HandlerRegistry implements HandlerRegistryInterface { - /** - * @var callable[] - */ + /** @var callable[] */ protected $handlers; public static function getDefaultMethod(int $direction, string $type, string $format): string diff --git a/src/Handler/LazyHandlerRegistry.php b/src/Handler/LazyHandlerRegistry.php index a569dca43..da38d3e20 100644 --- a/src/Handler/LazyHandlerRegistry.php +++ b/src/Handler/LazyHandlerRegistry.php @@ -10,14 +10,10 @@ final class LazyHandlerRegistry extends HandlerRegistry { - /** - * @var PsrContainerInterface|ContainerInterface - */ + /** @var PsrContainerInterface|ContainerInterface */ private $container; - /** - * @var array - */ + /** @var array */ private $initializedHandlers = []; /** diff --git a/src/JsonDeserializationVisitor.php b/src/JsonDeserializationVisitor.php index e4f8d8637..42c9dd09e 100644 --- a/src/JsonDeserializationVisitor.php +++ b/src/JsonDeserializationVisitor.php @@ -13,24 +13,16 @@ final class JsonDeserializationVisitor extends AbstractVisitor implements DeserializationVisitorInterface { - /** - * @var int - */ + /** @var int */ private $options; - /** - * @var int - */ + /** @var int */ private $depth; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $objectStack; - /** - * @var object|null - */ + /** @var object|null */ private $currentObject; public function __construct( diff --git a/src/JsonSerializationVisitor.php b/src/JsonSerializationVisitor.php index fbee58249..d025733bd 100644 --- a/src/JsonSerializationVisitor.php +++ b/src/JsonSerializationVisitor.php @@ -12,18 +12,12 @@ final class JsonSerializationVisitor extends AbstractVisitor implements SerializationVisitorInterface { - /** - * @var int - */ + /** @var int */ private $options; - /** - * @var array - */ + /** @var array */ private $dataStack; - /** - * @var \ArrayObject - */ + /** @var \ArrayObject */ private $data; public function __construct( diff --git a/src/Metadata/ClassMetadata.php b/src/Metadata/ClassMetadata.php index 1b6bab2f7..4015640c5 100644 --- a/src/Metadata/ClassMetadata.php +++ b/src/Metadata/ClassMetadata.php @@ -34,33 +34,21 @@ class ClassMetadata extends MergeableClassMetadata /** @var \ReflectionMethod[] */ public $postDeserializeMethods = []; - /** - * @var string - */ + /** @var string */ public $xmlRootName; - /** - * @var string - */ + /** @var string */ public $xmlRootNamespace; - /** - * @var string - */ + /** @var string */ public $xmlRootPrefix; - /** - * @var string[] - */ + /** @var string[] */ public $xmlNamespaces = []; - /** - * @var string - */ + /** @var string */ public $accessorOrder; - /** - * @var string[] - */ + /** @var string[] */ public $customOrder; /** @@ -84,52 +72,32 @@ class ClassMetadata extends MergeableClassMetadata */ public $isMap = false; - /** - * @var bool - */ + /** @var bool */ public $discriminatorDisabled = false; - /** - * @var string - */ + /** @var string */ public $discriminatorBaseClass; - /** - * @var string - */ + /** @var string */ public $discriminatorFieldName; - /** - * @var string - */ + /** @var string */ public $discriminatorValue; - /** - * @var string[] - */ + /** @var string[] */ public $discriminatorMap = []; - /** - * @var string[] - */ + /** @var string[] */ public $discriminatorGroups = []; - /** - * @var bool - */ + /** @var bool */ public $xmlDiscriminatorAttribute = false; - /** - * @var bool - */ + /** @var bool */ public $xmlDiscriminatorCData = true; - /** - * @var string - */ + /** @var string */ public $xmlDiscriminatorNamespace; - /** - * @var string|Expression - */ + /** @var string|Expression */ public $excludeIf; public function setDiscriminator(string $fieldName, array $map, array $groups = []): void diff --git a/src/Metadata/Driver/AbstractDoctrineTypeDriver.php b/src/Metadata/Driver/AbstractDoctrineTypeDriver.php index 0cb0b4a38..1985c8d45 100644 --- a/src/Metadata/Driver/AbstractDoctrineTypeDriver.php +++ b/src/Metadata/Driver/AbstractDoctrineTypeDriver.php @@ -56,18 +56,12 @@ abstract class AbstractDoctrineTypeDriver implements DriverInterface 'json_array' => 'array', 'simple_array' => 'array', ]; - /** - * @var DriverInterface - */ + /** @var DriverInterface */ protected $delegate; - /** - * @var ManagerRegistry - */ + /** @var ManagerRegistry */ protected $registry; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ protected $typeParser; public function __construct(DriverInterface $delegate, ManagerRegistry $registry, ?ParserInterface $typeParser = null) diff --git a/src/Metadata/Driver/AnnotationDriver.php b/src/Metadata/Driver/AnnotationDriver.php index 013d0022e..10bffd0d5 100644 --- a/src/Metadata/Driver/AnnotationDriver.php +++ b/src/Metadata/Driver/AnnotationDriver.php @@ -52,18 +52,12 @@ class AnnotationDriver implements DriverInterface { use ExpressionMetadataTrait; - /** - * @var Reader - */ + /** @var Reader */ private $reader; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ private $typeParser; - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $namingStrategy; public function __construct(Reader $reader, PropertyNamingStrategyInterface $namingStrategy, ?ParserInterface $typeParser = null, ?CompilableExpressionEvaluatorInterface $expressionEvaluator = null) diff --git a/src/Metadata/Driver/DocBlockDriver.php b/src/Metadata/Driver/DocBlockDriver.php index 3df37db8f..9bc1320fd 100644 --- a/src/Metadata/Driver/DocBlockDriver.php +++ b/src/Metadata/Driver/DocBlockDriver.php @@ -19,18 +19,12 @@ class DocBlockDriver implements DriverInterface { - /** - * @var DriverInterface - */ + /** @var DriverInterface */ protected $delegate; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ protected $typeParser; - /** - * @var DocBlockTypeResolver - */ + /** @var DocBlockTypeResolver */ private $docBlockTypeResolver; public function __construct(DriverInterface $delegate, ?ParserInterface $typeParser = null) diff --git a/src/Metadata/Driver/DocBlockDriverFactory.php b/src/Metadata/Driver/DocBlockDriverFactory.php index 676dfe3b3..825e11b62 100644 --- a/src/Metadata/Driver/DocBlockDriverFactory.php +++ b/src/Metadata/Driver/DocBlockDriverFactory.php @@ -11,13 +11,9 @@ class DocBlockDriverFactory implements DriverFactoryInterface { - /** - * @var DriverFactoryInterface - */ + /** @var DriverFactoryInterface */ private $driverFactoryToDecorate; - /** - * @var ParserInterface|null - */ + /** @var ParserInterface|null */ private $typeParser; public function __construct(DriverFactoryInterface $driverFactoryToDecorate, ?ParserInterface $typeParser = null) diff --git a/src/Metadata/Driver/DocBlockTypeResolver.php b/src/Metadata/Driver/DocBlockTypeResolver.php index fffe51797..f154063f7 100644 --- a/src/Metadata/Driver/DocBlockTypeResolver.php +++ b/src/Metadata/Driver/DocBlockTypeResolver.php @@ -24,14 +24,10 @@ class DocBlockTypeResolver private const GROUP_USE_STATEMENTS_REGEX = '/^[^\S\r\n]*use[[\s]*([^;\n]*)[\s]*{([a-zA-Z0-9\s\n\r,]*)};$/m'; private const GLOBAL_NAMESPACE_PREFIX = '\\'; - /** - * @var PhpDocParser - */ + /** @var PhpDocParser */ protected $phpDocParser; - /** - * @var Lexer - */ + /** @var Lexer */ protected $lexer; public function __construct() diff --git a/src/Metadata/Driver/ExpressionMetadataTrait.php b/src/Metadata/Driver/ExpressionMetadataTrait.php index 515ceca13..bc217eeb8 100644 --- a/src/Metadata/Driver/ExpressionMetadataTrait.php +++ b/src/Metadata/Driver/ExpressionMetadataTrait.php @@ -10,9 +10,7 @@ trait ExpressionMetadataTrait { - /** - * @var CompilableExpressionEvaluatorInterface - */ + /** @var CompilableExpressionEvaluatorInterface */ private $expressionEvaluator; /** diff --git a/src/Metadata/Driver/TypedPropertiesDriver.php b/src/Metadata/Driver/TypedPropertiesDriver.php index 9e6ba2727..f71f97206 100644 --- a/src/Metadata/Driver/TypedPropertiesDriver.php +++ b/src/Metadata/Driver/TypedPropertiesDriver.php @@ -19,19 +19,13 @@ class TypedPropertiesDriver implements DriverInterface { - /** - * @var DriverInterface - */ + /** @var DriverInterface */ protected $delegate; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ protected $typeParser; - /** - * @var string[] - */ + /** @var string[] */ private $whiteList; /** diff --git a/src/Metadata/Driver/XmlDriver.php b/src/Metadata/Driver/XmlDriver.php index 9eecf5502..bb319d0e5 100644 --- a/src/Metadata/Driver/XmlDriver.php +++ b/src/Metadata/Driver/XmlDriver.php @@ -24,13 +24,9 @@ class XmlDriver extends AbstractFileDriver { use ExpressionMetadataTrait; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ private $typeParser; - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $namingStrategy; public function __construct(FileLocatorInterface $locator, PropertyNamingStrategyInterface $namingStrategy, ?ParserInterface $typeParser = null, ?CompilableExpressionEvaluatorInterface $expressionEvaluator = null) diff --git a/src/Metadata/Driver/YamlDriver.php b/src/Metadata/Driver/YamlDriver.php index e7880c6a1..a192361eb 100644 --- a/src/Metadata/Driver/YamlDriver.php +++ b/src/Metadata/Driver/YamlDriver.php @@ -27,17 +27,11 @@ class YamlDriver extends AbstractFileDriver { use ExpressionMetadataTrait; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ private $typeParser; - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $namingStrategy; - /** - * @var FileLocatorInterface - */ + /** @var FileLocatorInterface */ private $locator; public function __construct(FileLocatorInterface $locator, PropertyNamingStrategyInterface $namingStrategy, ?ParserInterface $typeParser = null, ?CompilableExpressionEvaluatorInterface $expressionEvaluator = null) diff --git a/src/Metadata/ExpressionPropertyMetadata.php b/src/Metadata/ExpressionPropertyMetadata.php index 697f2a966..87e8e4271 100644 --- a/src/Metadata/ExpressionPropertyMetadata.php +++ b/src/Metadata/ExpressionPropertyMetadata.php @@ -14,9 +14,7 @@ */ class ExpressionPropertyMetadata extends PropertyMetadata { - /** - * @var string|Expression - */ + /** @var string|Expression */ public $expression; /** diff --git a/src/Metadata/PropertyMetadata.php b/src/Metadata/PropertyMetadata.php index f7d0f513c..ba0c13b9e 100644 --- a/src/Metadata/PropertyMetadata.php +++ b/src/Metadata/PropertyMetadata.php @@ -13,120 +13,72 @@ class PropertyMetadata extends BasePropertyMetadata public const ACCESS_TYPE_PROPERTY = 'property'; public const ACCESS_TYPE_PUBLIC_METHOD = 'public_method'; - /** - * @var string - */ + /** @var string */ public $sinceVersion; - /** - * @var string - */ + /** @var string */ public $untilVersion; - /** - * @var string[] - */ + /** @var string[] */ public $groups; - /** - * @var string - */ + /** @var string */ public $serializedName; - /** - * @var array - */ + /** @var array */ public $type; - /** - * @var bool - */ + /** @var bool */ public $xmlCollection = false; - /** - * @var bool - */ + /** @var bool */ public $xmlCollectionInline = false; - /** - * @var bool - */ + /** @var bool */ public $xmlCollectionSkipWhenEmpty = true; - /** - * @var string - */ + /** @var string */ public $xmlEntryName; - /** - * @var string - */ + /** @var string */ public $xmlEntryNamespace; - /** - * @var string - */ + /** @var string */ public $xmlKeyAttribute; - /** - * @var bool - */ + /** @var bool */ public $xmlAttribute = false; - /** - * @var bool - */ + /** @var bool */ public $xmlValue = false; - /** - * @var string - */ + /** @var string */ public $xmlNamespace; - /** - * @var bool - */ + /** @var bool */ public $xmlKeyValuePairs = false; - /** - * @var bool - */ + /** @var bool */ public $xmlElementCData = true; - /** - * @var string - */ + /** @var string */ public $getter; - /** - * @var string - */ + /** @var string */ public $setter; - /** - * @var bool - */ + /** @var bool */ public $inline = false; - /** - * @var bool - */ + /** @var bool */ public $skipWhenEmpty = false; - /** - * @var bool - */ + /** @var bool */ public $readOnly = false; - /** - * @var bool - */ + /** @var bool */ public $xmlAttributeMap = false; - /** - * @var int|null - */ + /** @var int|null */ public $maxDepth = null; - /** - * @var string|Expression - */ + /** @var string|Expression */ public $excludeIf = null; /** diff --git a/src/Metadata/StaticPropertyMetadata.php b/src/Metadata/StaticPropertyMetadata.php index 6d0079709..e8071dc8a 100644 --- a/src/Metadata/StaticPropertyMetadata.php +++ b/src/Metadata/StaticPropertyMetadata.php @@ -6,9 +6,7 @@ class StaticPropertyMetadata extends PropertyMetadata { - /** - * @var mixed - */ + /** @var mixed */ private $value; /** diff --git a/src/Naming/CamelCaseNamingStrategy.php b/src/Naming/CamelCaseNamingStrategy.php index 71d451715..5645fb8d3 100644 --- a/src/Naming/CamelCaseNamingStrategy.php +++ b/src/Naming/CamelCaseNamingStrategy.php @@ -13,14 +13,10 @@ */ final class CamelCaseNamingStrategy implements PropertyNamingStrategyInterface { - /** - * @var string - */ + /** @var string */ private $separator; - /** - * @var bool - */ + /** @var bool */ private $lowerCase; public function __construct(string $separator = '_', bool $lowerCase = true) diff --git a/src/Naming/SerializedNameAnnotationStrategy.php b/src/Naming/SerializedNameAnnotationStrategy.php index 702b66cf8..be843da61 100644 --- a/src/Naming/SerializedNameAnnotationStrategy.php +++ b/src/Naming/SerializedNameAnnotationStrategy.php @@ -13,9 +13,7 @@ */ final class SerializedNameAnnotationStrategy implements PropertyNamingStrategyInterface { - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $delegate; public function __construct(PropertyNamingStrategyInterface $namingStrategy) diff --git a/src/SerializationContext.php b/src/SerializationContext.php index 24073536b..645ba9f77 100644 --- a/src/SerializationContext.php +++ b/src/SerializationContext.php @@ -15,14 +15,10 @@ class SerializationContext extends Context /** @var \SplStack */ private $visitingStack; - /** - * @var string - */ + /** @var string */ private $initialType; - /** - * @var bool - */ + /** @var bool */ private $serializeNull = false; public static function create(): self diff --git a/src/Serializer.php b/src/Serializer.php index 030d9f59d..8da5ccd69 100644 --- a/src/Serializer.php +++ b/src/Serializer.php @@ -25,39 +25,25 @@ */ final class Serializer implements SerializerInterface, ArrayTransformerInterface { - /** - * @var MetadataFactoryInterface - */ + /** @var MetadataFactoryInterface */ private $factory; - /** - * @var TypeParser - */ + /** @var TypeParser */ private $typeParser; - /** - * @var SerializationVisitorFactory[] - */ + /** @var SerializationVisitorFactory[] */ private $serializationVisitors; - /** - * @var DeserializationVisitorFactory[] - */ + /** @var DeserializationVisitorFactory[] */ private $deserializationVisitors; - /** - * @var SerializationContextFactoryInterface - */ + /** @var SerializationContextFactoryInterface */ private $serializationContextFactory; - /** - * @var DeserializationContextFactoryInterface - */ + /** @var DeserializationContextFactoryInterface */ private $deserializationContextFactory; - /** - * @var GraphNavigatorFactoryInterface[] - */ + /** @var GraphNavigatorFactoryInterface[] */ private $graphNavigators; /** diff --git a/src/SerializerBuilder.php b/src/SerializerBuilder.php index a315889a5..d98a0450e 100644 --- a/src/SerializerBuilder.php +++ b/src/SerializerBuilder.php @@ -61,114 +61,70 @@ */ final class SerializerBuilder { - /** - * @var string[] - */ + /** @var string[] */ private $metadataDirs = []; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ private $handlerRegistry; - /** - * @var bool - */ + /** @var bool */ private $handlersConfigured = false; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ private $eventDispatcher; - /** - * @var bool - */ + /** @var bool */ private $listenersConfigured = false; - /** - * @var ObjectConstructorInterface - */ + /** @var ObjectConstructorInterface */ private $objectConstructor; - /** - * @var SerializationVisitorFactory[] - */ + /** @var SerializationVisitorFactory[] */ private $serializationVisitors; - /** - * @var DeserializationVisitorFactory[] - */ + /** @var DeserializationVisitorFactory[] */ private $deserializationVisitors; - /** - * @var bool - */ + /** @var bool */ private $visitorsAdded = false; - /** - * @var PropertyNamingStrategyInterface - */ + /** @var PropertyNamingStrategyInterface */ private $propertyNamingStrategy; - /** - * @var bool - */ + /** @var bool */ private $debug = false; - /** - * @var string - */ + /** @var string */ private $cacheDir; - /** - * @var AnnotationReader - */ + /** @var AnnotationReader */ private $annotationReader; - /** - * @var bool - */ + /** @var bool */ private $includeInterfaceMetadata = false; - /** - * @var DriverFactoryInterface - */ + /** @var DriverFactoryInterface */ private $driverFactory; - /** - * @var SerializationContextFactoryInterface - */ + /** @var SerializationContextFactoryInterface */ private $serializationContextFactory; - /** - * @var DeserializationContextFactoryInterface - */ + /** @var DeserializationContextFactoryInterface */ private $deserializationContextFactory; - /** - * @var ParserInterface - */ + /** @var ParserInterface */ private $typeParser; - /** - * @var ExpressionEvaluatorInterface - */ + /** @var ExpressionEvaluatorInterface */ private $expressionEvaluator; - /** - * @var AccessorStrategyInterface - */ + /** @var AccessorStrategyInterface */ private $accessorStrategy; - /** - * @var CacheInterface - */ + /** @var CacheInterface */ private $metadataCache; - /** - * @var bool - */ + /** @var bool */ private $docBlockTyperResolver; /** diff --git a/src/Twig/SerializerExtension.php b/src/Twig/SerializerExtension.php index 83365aae1..c68d1080b 100644 --- a/src/Twig/SerializerExtension.php +++ b/src/Twig/SerializerExtension.php @@ -17,9 +17,7 @@ */ class SerializerExtension extends AbstractExtension { - /** - * @var SerializerInterface - */ + /** @var SerializerInterface */ protected $serializer; /** diff --git a/src/Twig/SerializerRuntimeHelper.php b/src/Twig/SerializerRuntimeHelper.php index 57179d8c9..9735819eb 100644 --- a/src/Twig/SerializerRuntimeHelper.php +++ b/src/Twig/SerializerRuntimeHelper.php @@ -12,9 +12,7 @@ */ final class SerializerRuntimeHelper { - /** - * @var SerializerInterface - */ + /** @var SerializerInterface */ protected $serializer; public function __construct(SerializerInterface $serializer) diff --git a/src/Type/Parser.php b/src/Type/Parser.php index 2accb9272..dd525a7c1 100644 --- a/src/Type/Parser.php +++ b/src/Type/Parser.php @@ -11,14 +11,10 @@ */ final class Parser implements ParserInterface { - /** - * @var Lexer - */ + /** @var Lexer */ private $lexer; - /** - * @var bool - */ + /** @var bool */ private $root = true; public function parse(string $string): array diff --git a/src/Visitor/Factory/JsonDeserializationVisitorFactory.php b/src/Visitor/Factory/JsonDeserializationVisitorFactory.php index a5dbebe33..2a8bae554 100644 --- a/src/Visitor/Factory/JsonDeserializationVisitorFactory.php +++ b/src/Visitor/Factory/JsonDeserializationVisitorFactory.php @@ -12,14 +12,10 @@ */ final class JsonDeserializationVisitorFactory implements DeserializationVisitorFactory { - /** - * @var int - */ + /** @var int */ private $options = 0; - /** - * @var int - */ + /** @var int */ private $depth = 512; public function getVisitor(): DeserializationVisitorInterface diff --git a/src/Visitor/Factory/JsonSerializationVisitorFactory.php b/src/Visitor/Factory/JsonSerializationVisitorFactory.php index 12d3e59cb..9f7c1a2c2 100644 --- a/src/Visitor/Factory/JsonSerializationVisitorFactory.php +++ b/src/Visitor/Factory/JsonSerializationVisitorFactory.php @@ -12,9 +12,7 @@ */ final class JsonSerializationVisitorFactory implements SerializationVisitorFactory { - /** - * @var int - */ + /** @var int */ private $options = JSON_PRESERVE_ZERO_FRACTION; public function getVisitor(): SerializationVisitorInterface diff --git a/src/Visitor/Factory/XmlDeserializationVisitorFactory.php b/src/Visitor/Factory/XmlDeserializationVisitorFactory.php index f0c3d2dc2..798b798a2 100644 --- a/src/Visitor/Factory/XmlDeserializationVisitorFactory.php +++ b/src/Visitor/Factory/XmlDeserializationVisitorFactory.php @@ -12,19 +12,13 @@ */ final class XmlDeserializationVisitorFactory implements DeserializationVisitorFactory { - /** - * @var bool - */ + /** @var bool */ private $disableExternalEntities = true; - /** - * @var string[] - */ + /** @var string[] */ private $doctypeWhitelist = []; - /** - * @var int - */ + /** @var int */ private $options = 0; public function getVisitor(): DeserializationVisitorInterface diff --git a/src/Visitor/Factory/XmlSerializationVisitorFactory.php b/src/Visitor/Factory/XmlSerializationVisitorFactory.php index 10541a457..8313fb76b 100644 --- a/src/Visitor/Factory/XmlSerializationVisitorFactory.php +++ b/src/Visitor/Factory/XmlSerializationVisitorFactory.php @@ -12,29 +12,19 @@ */ final class XmlSerializationVisitorFactory implements SerializationVisitorFactory { - /** - * @var string - */ + /** @var string */ private $defaultRootName = 'result'; - /** - * @var string - */ + /** @var string */ private $defaultVersion = '1.0'; - /** - * @var string - */ + /** @var string */ private $defaultEncoding = 'UTF-8'; - /** - * @var bool - */ + /** @var bool */ private $formatOutput = true; - /** - * @var string|null - */ + /** @var string|null */ private $defaultRootNamespace; public function getVisitor(): SerializationVisitorInterface diff --git a/src/XmlDeserializationVisitor.php b/src/XmlDeserializationVisitor.php index 8c0a0e5b5..574796233 100644 --- a/src/XmlDeserializationVisitor.php +++ b/src/XmlDeserializationVisitor.php @@ -15,43 +15,27 @@ final class XmlDeserializationVisitor extends AbstractVisitor implements NullAwareVisitorInterface, DeserializationVisitorInterface { - /** - * @var \SplStack - */ + /** @var \SplStack */ private $objectStack; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $metadataStack; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $objectMetadataStack; - /** - * @var object|null - */ + /** @var object|null */ private $currentObject; - /** - * @var ClassMetadata|PropertyMetadata|null - */ + /** @var ClassMetadata|PropertyMetadata|null */ private $currentMetadata; - /** - * @var bool - */ + /** @var bool */ private $disableExternalEntities; - /** - * @var string[] - */ + /** @var string[] */ private $doctypeWhitelist; - /** - * @var int - */ + /** @var int */ private $options; public function __construct( diff --git a/src/XmlSerializationVisitor.php b/src/XmlSerializationVisitor.php index 48439eb67..fb19950b8 100644 --- a/src/XmlSerializationVisitor.php +++ b/src/XmlSerializationVisitor.php @@ -17,59 +17,37 @@ */ final class XmlSerializationVisitor extends AbstractVisitor implements SerializationVisitorInterface { - /** - * @var \DOMDocument - */ + /** @var \DOMDocument */ private $document; - /** - * @var string - */ + /** @var string */ private $defaultRootName; - /** - * @var string|null - */ + /** @var string|null */ private $defaultRootNamespace; - /** - * @var string|null - */ + /** @var string|null */ private $defaultRootPrefix; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $stack; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $metadataStack; - /** - * @var \DOMNode|\DOMElement|null - */ + /** @var \DOMNode|\DOMElement|null */ private $currentNode; - /** - * @var ClassMetadata|PropertyMetadata|null - */ + /** @var ClassMetadata|PropertyMetadata|null */ private $currentMetadata; - /** - * @var bool - */ + /** @var bool */ private $hasValue; - /** - * @var bool - */ + /** @var bool */ private $nullWasVisited; - /** - * @var \SplStack - */ + /** @var \SplStack */ private $objectMetadataStack; public function __construct( diff --git a/tests/Expression/ExpressionEvaluatorTest.php b/tests/Expression/ExpressionEvaluatorTest.php index 8af379c6c..84cc2b233 100644 --- a/tests/Expression/ExpressionEvaluatorTest.php +++ b/tests/Expression/ExpressionEvaluatorTest.php @@ -11,9 +11,7 @@ class ExpressionEvaluatorTest extends TestCase { - /** - * @var ExpressionEvaluator - */ + /** @var ExpressionEvaluator */ private $evaluator; protected function setUp(): void diff --git a/tests/Fixtures/AllExcludedObject.php b/tests/Fixtures/AllExcludedObject.php index 837229b04..325515dcf 100644 --- a/tests/Fixtures/AllExcludedObject.php +++ b/tests/Fixtures/AllExcludedObject.php @@ -16,8 +16,6 @@ class AllExcludedObject { private $foo = 'foo'; - /** - * @Expose - */ + /** @Expose */ private $bar = 'bar'; } diff --git a/tests/Fixtures/AuthorExpressionAccess.php b/tests/Fixtures/AuthorExpressionAccess.php index 100e4013c..8595ff1bf 100644 --- a/tests/Fixtures/AuthorExpressionAccess.php +++ b/tests/Fixtures/AuthorExpressionAccess.php @@ -12,14 +12,10 @@ class AuthorExpressionAccess { private $id; - /** - * @Serializer\Exclude() - */ + /** @Serializer\Exclude() */ private $firstName; - /** - * @Serializer\Exclude() - */ + /** @Serializer\Exclude() */ private $lastName; public function __construct($id, $firstName, $lastName) diff --git a/tests/Fixtures/AuthorExpressionAccessContext.php b/tests/Fixtures/AuthorExpressionAccessContext.php index 73790cc3b..31eccb91f 100644 --- a/tests/Fixtures/AuthorExpressionAccessContext.php +++ b/tests/Fixtures/AuthorExpressionAccessContext.php @@ -13,9 +13,7 @@ */ class AuthorExpressionAccessContext { - /** - * @Serializer\Exclude() - */ + /** @Serializer\Exclude() */ private $firstName; public function __construct($firstName) diff --git a/tests/Fixtures/BlogPost.php b/tests/Fixtures/BlogPost.php index 81baaab9c..2fbb18994 100644 --- a/tests/Fixtures/BlogPost.php +++ b/tests/Fixtures/BlogPost.php @@ -94,9 +94,7 @@ class BlogPost */ private $author; - /** - * @Type("JMS\Serializer\Tests\Fixtures\Publisher") - */ + /** @Type("JMS\Serializer\Tests\Fixtures\Publisher") */ private $publisher; /** diff --git a/tests/Fixtures/Comment.php b/tests/Fixtures/Comment.php index 0c46999f0..3a00aad92 100644 --- a/tests/Fixtures/Comment.php +++ b/tests/Fixtures/Comment.php @@ -8,14 +8,10 @@ class Comment { - /** - * @Type("JMS\Serializer\Tests\Fixtures\Author") - */ + /** @Type("JMS\Serializer\Tests\Fixtures\Author") */ private $author; - /** - * @Type("string") - */ + /** @Type("string") */ private $text; public function __construct(?Author $author = null, $text) diff --git a/tests/Fixtures/CustomDeserializationObject.php b/tests/Fixtures/CustomDeserializationObject.php index f4ad7bdae..5611d3bce 100644 --- a/tests/Fixtures/CustomDeserializationObject.php +++ b/tests/Fixtures/CustomDeserializationObject.php @@ -8,9 +8,7 @@ class CustomDeserializationObject { - /** - * @Type("string") - */ + /** @Type("string") */ public $someProperty; public function __construct($value) diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespace.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespace.php index ebb737285..2df531450 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespace.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespace.php @@ -8,8 +8,6 @@ class CollectionOfClassesFromDifferentNamespace { - /** - * @var ProductDescription[] - */ + /** @var ProductDescription[] */ public array $productDescriptions; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingGroupAlias.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingGroupAlias.php index 3891aca31..09dc24d20 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingGroupAlias.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingGroupAlias.php @@ -8,12 +8,8 @@ class CollectionOfClassesFromDifferentNamespaceUsingGroupAlias { - /** - * @var Description[] - */ + /** @var Description[] */ public array $productDescriptions; - /** - * @var ProductName[] - */ + /** @var ProductName[] */ public array $productNames; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingSingleAlias.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingSingleAlias.php index 65ce82e36..c51177dfd 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingSingleAlias.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromDifferentNamespaceUsingSingleAlias.php @@ -8,8 +8,6 @@ class CollectionOfClassesFromDifferentNamespaceUsingSingleAlias { - /** - * @var Description[] - */ + /** @var Description[] */ public array $productDescriptions; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromGlobalNamespace.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromGlobalNamespace.php index b8ced842f..8c5971516 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromGlobalNamespace.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromGlobalNamespace.php @@ -6,8 +6,6 @@ class CollectionOfClassesFromGlobalNamespace { - /** - * @var \stdClass[] - */ + /** @var \stdClass[] */ public array $products; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromSameNamespace.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromSameNamespace.php index 8c1bb4b74..10bb695f9 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromSameNamespace.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesFromSameNamespace.php @@ -6,8 +6,6 @@ class CollectionOfClassesFromSameNamespace { - /** - * @var Product[] - */ + /** @var Product[] */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithFullNamespacePath.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithFullNamespacePath.php index 9db8f5887..2582366c0 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithFullNamespacePath.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithFullNamespacePath.php @@ -6,8 +6,6 @@ class CollectionOfClassesWithFullNamespacePath { - /** - * @var JMS\Serializer\Tests\Fixtures\DocBlockType\Collection\Product[] - */ + /** @var JMS\Serializer\Tests\Fixtures\DocBlockType\Collection\Product[] */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithNull.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithNull.php index 9bd137e5f..fd4c667fa 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithNull.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfClassesWithNull.php @@ -6,8 +6,6 @@ class CollectionOfClassesWithNull { - /** - * @var Product[]|null - */ + /** @var Product[]|null */ public ?array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromDifferentNamespace.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromDifferentNamespace.php index 0e47ac0ab..cc46d2793 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromDifferentNamespace.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromDifferentNamespace.php @@ -8,8 +8,6 @@ class CollectionOfInterfacesFromDifferentNamespace { - /** - * @var ProductColor[] - */ + /** @var ProductColor[] */ public array $productColors; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromSameNamespace.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromSameNamespace.php index 423a09efa..f67052bc8 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromSameNamespace.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesFromSameNamespace.php @@ -6,8 +6,6 @@ class CollectionOfInterfacesFromSameNamespace { - /** - * @var Vehicle[] - */ + /** @var Vehicle[] */ public array $vehicles; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesWithFullNamespacePath.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesWithFullNamespacePath.php index 9b681775d..2f5de665c 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesWithFullNamespacePath.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfInterfacesWithFullNamespacePath.php @@ -6,8 +6,6 @@ class CollectionOfInterfacesWithFullNamespacePath { - /** - * @var JMS\Serializer\Tests\Fixtures\DocBlockType\Collection\Details\ProductColor[] - */ + /** @var JMS\Serializer\Tests\Fixtures\DocBlockType\Collection\Details\ProductColor[] */ public array $productColors; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfNotExistingClasses.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfNotExistingClasses.php index 82befd4a3..2955bf190 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfNotExistingClasses.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfNotExistingClasses.php @@ -6,8 +6,6 @@ class CollectionOfNotExistingClasses { - /** - * @var NotExistingClass[] - */ + /** @var NotExistingClass[] */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfScalars.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfScalars.php index cf49db9ea..904ed8231 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfScalars.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfScalars.php @@ -6,8 +6,6 @@ class CollectionOfScalars { - /** - * @var string[] - */ + /** @var string[] */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionOfUnionClasses.php b/tests/Fixtures/DocBlockType/Collection/CollectionOfUnionClasses.php index 0bb5f9d18..aa0d6766f 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionOfUnionClasses.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionOfUnionClasses.php @@ -9,8 +9,6 @@ class CollectionOfUnionClasses { - /** - * @var ProductName[]|ProductDescription[] - */ + /** @var ProductName[]|ProductDescription[] */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/CollectionTypedAsGenericClass.php b/tests/Fixtures/DocBlockType/Collection/CollectionTypedAsGenericClass.php index cf50b2d7b..7d64032ef 100644 --- a/tests/Fixtures/DocBlockType/Collection/CollectionTypedAsGenericClass.php +++ b/tests/Fixtures/DocBlockType/Collection/CollectionTypedAsGenericClass.php @@ -6,8 +6,6 @@ class CollectionTypedAsGenericClass { - /** - * @var array - */ + /** @var array */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/Details/ProductDescription.php b/tests/Fixtures/DocBlockType/Collection/Details/ProductDescription.php index ab85fb1ba..03c2c997d 100644 --- a/tests/Fixtures/DocBlockType/Collection/Details/ProductDescription.php +++ b/tests/Fixtures/DocBlockType/Collection/Details/ProductDescription.php @@ -6,8 +6,6 @@ class ProductDescription { - /** - * @var string - */ + /** @var string */ public $description; } diff --git a/tests/Fixtures/DocBlockType/Collection/Details/WithProductDescriptionTrait.php b/tests/Fixtures/DocBlockType/Collection/Details/WithProductDescriptionTrait.php index b61142034..a3fa1703f 100644 --- a/tests/Fixtures/DocBlockType/Collection/Details/WithProductDescriptionTrait.php +++ b/tests/Fixtures/DocBlockType/Collection/Details/WithProductDescriptionTrait.php @@ -6,8 +6,6 @@ trait WithProductDescriptionTrait { - /** - * @var ProductDescription[] - */ + /** @var ProductDescription[] */ public array $productDescriptions; } diff --git a/tests/Fixtures/DocBlockType/Collection/MapTypedAsGenericClass.php b/tests/Fixtures/DocBlockType/Collection/MapTypedAsGenericClass.php index 5f3b3f7e0..d8301a646 100644 --- a/tests/Fixtures/DocBlockType/Collection/MapTypedAsGenericClass.php +++ b/tests/Fixtures/DocBlockType/Collection/MapTypedAsGenericClass.php @@ -6,8 +6,6 @@ class MapTypedAsGenericClass { - /** - * @var array - */ + /** @var array */ public array $productIds; } diff --git a/tests/Fixtures/DocBlockType/Collection/WithProductNameTrait.php b/tests/Fixtures/DocBlockType/Collection/WithProductNameTrait.php index 3e3ddba3d..b1a026f1e 100644 --- a/tests/Fixtures/DocBlockType/Collection/WithProductNameTrait.php +++ b/tests/Fixtures/DocBlockType/Collection/WithProductNameTrait.php @@ -8,8 +8,6 @@ trait WithProductNameTrait { - /** - * @var ProductName[] - */ + /** @var ProductName[] */ public array $productNames; } diff --git a/tests/Fixtures/DocBlockType/SingleClassFromDifferentNamespaceTypeHint.php b/tests/Fixtures/DocBlockType/SingleClassFromDifferentNamespaceTypeHint.php index 6846cf2ba..3f81e08d1 100644 --- a/tests/Fixtures/DocBlockType/SingleClassFromDifferentNamespaceTypeHint.php +++ b/tests/Fixtures/DocBlockType/SingleClassFromDifferentNamespaceTypeHint.php @@ -8,8 +8,6 @@ class SingleClassFromDifferentNamespaceTypeHint { - /** - * @var ProductDescription - */ + /** @var ProductDescription */ public $data; } diff --git a/tests/Fixtures/DocBlockType/SingleClassFromGlobalNamespaceTypeHint.php b/tests/Fixtures/DocBlockType/SingleClassFromGlobalNamespaceTypeHint.php index 2f1ae8587..cbec9552e 100644 --- a/tests/Fixtures/DocBlockType/SingleClassFromGlobalNamespaceTypeHint.php +++ b/tests/Fixtures/DocBlockType/SingleClassFromGlobalNamespaceTypeHint.php @@ -6,8 +6,6 @@ class SingleClassFromGlobalNamespaceTypeHint { - /** - * @var \stdClass - */ + /** @var \stdClass */ private $data; } diff --git a/tests/Fixtures/Doctrine/Embeddable/BlogPostWithEmbedded.php b/tests/Fixtures/Doctrine/Embeddable/BlogPostWithEmbedded.php index 463655b1d..7986bf3bc 100644 --- a/tests/Fixtures/Doctrine/Embeddable/BlogPostWithEmbedded.php +++ b/tests/Fixtures/Doctrine/Embeddable/BlogPostWithEmbedded.php @@ -18,8 +18,6 @@ class BlogPostWithEmbedded */ protected $id; - /** - * @ORM\Embedded(class="BlogPostSeo", columnPrefix="seo_") - */ + /** @ORM\Embedded(class="BlogPostSeo", columnPrefix="seo_") */ private $seo; } diff --git a/tests/Fixtures/Doctrine/Entity/BlogPost.php b/tests/Fixtures/Doctrine/Entity/BlogPost.php index 7cd41ca87..9a9a95f9f 100644 --- a/tests/Fixtures/Doctrine/Entity/BlogPost.php +++ b/tests/Fixtures/Doctrine/Entity/BlogPost.php @@ -21,9 +21,7 @@ */ class BlogPost { - /** - * @ORM\Id @ORM\Column(type="guid") @ORM\GeneratedValue(strategy="UUID") - */ + /** @ORM\Id @ORM\Column(type="guid") @ORM\GeneratedValue(strategy="UUID") */ protected $id; /** @@ -33,9 +31,7 @@ class BlogPost */ private $title; - /** - * @ORM\Column(type="some_custom_type") - */ + /** @ORM\Column(type="some_custom_type") */ protected $slug; /** diff --git a/tests/Fixtures/Doctrine/Entity/Comment.php b/tests/Fixtures/Doctrine/Entity/Comment.php index a8fad7e41..b1af0ab11 100644 --- a/tests/Fixtures/Doctrine/Entity/Comment.php +++ b/tests/Fixtures/Doctrine/Entity/Comment.php @@ -10,22 +10,16 @@ /** @ORM\Entity */ class Comment { - /** - * @ORM\Id @ORM\Column(type="integer") - */ + /** @ORM\Id @ORM\Column(type="integer") */ protected $id; - /** - * @ORM\Column(type="Author") - */ + /** @ORM\Column(type="Author") */ private $author; /** @ORM\ManyToOne(targetEntity="BlogPost") */ private $blogPost; - /** - * @ORM\Column(type="string") - */ + /** @ORM\Column(type="string") */ private $text; public function __construct(Author $author, $text) diff --git a/tests/Fixtures/DoctrinePHPCR/Author.php b/tests/Fixtures/DoctrinePHPCR/Author.php index 5ae5b0817..4eea8b722 100644 --- a/tests/Fixtures/DoctrinePHPCR/Author.php +++ b/tests/Fixtures/DoctrinePHPCR/Author.php @@ -10,9 +10,7 @@ /** @PHPCRODM\Document */ class Author { - /** - * @PHPCRODM\Id() - */ + /** @PHPCRODM\Id() */ protected $id; /** diff --git a/tests/Fixtures/DoctrinePHPCR/BlogPost.php b/tests/Fixtures/DoctrinePHPCR/BlogPost.php index cccf0100d..e3b0dc7d0 100644 --- a/tests/Fixtures/DoctrinePHPCR/BlogPost.php +++ b/tests/Fixtures/DoctrinePHPCR/BlogPost.php @@ -19,9 +19,7 @@ */ class BlogPost { - /** - * @PHPCRODM\Id() - */ + /** @PHPCRODM\Id() */ protected $id; /** @@ -30,9 +28,7 @@ class BlogPost */ private $title; - /** - * @PHPCRODM\Field(type="string") - */ + /** @PHPCRODM\Field(type="string") */ protected $slug; /** diff --git a/tests/Fixtures/DoctrinePHPCR/Comment.php b/tests/Fixtures/DoctrinePHPCR/Comment.php index 86daa66bf..65e833f24 100644 --- a/tests/Fixtures/DoctrinePHPCR/Comment.php +++ b/tests/Fixtures/DoctrinePHPCR/Comment.php @@ -10,22 +10,16 @@ /** @PHPCRODM\Document */ class Comment { - /** - * @PHPCRODM\Id() - */ + /** @PHPCRODM\Id() */ protected $id; - /** - * @PHPCRODM\ReferenceOne(targetDocument="Author") - */ + /** @PHPCRODM\ReferenceOne(targetDocument="Author") */ private $author; /** @PHPCRODM\ReferenceOne(targetDocument="BlogPost") */ private $blogPost; - /** - * @PHPCRODM\Field(type="string") - */ + /** @PHPCRODM\Field(type="string") */ private $text; public function __construct(Author $author, $text) diff --git a/tests/Fixtures/ExcludePublicAccessor.php b/tests/Fixtures/ExcludePublicAccessor.php index 9879b9c70..3b34b7815 100644 --- a/tests/Fixtures/ExcludePublicAccessor.php +++ b/tests/Fixtures/ExcludePublicAccessor.php @@ -20,9 +20,7 @@ class ExcludePublicAccessor */ private $iShallNotBeAccessed; - /** - * @var int - */ + /** @var int */ private $id = 1; public function getId() diff --git a/tests/Fixtures/Garage.php b/tests/Fixtures/Garage.php index c62dce241..1adcfa8a4 100644 --- a/tests/Fixtures/Garage.php +++ b/tests/Fixtures/Garage.php @@ -8,9 +8,7 @@ class Garage { - /** - * @Type("array") - */ + /** @Type("array") */ public $vehicles; public function __construct($vehicles) diff --git a/tests/Fixtures/GetSetObject.php b/tests/Fixtures/GetSetObject.php index 26b01e359..37a956e18 100644 --- a/tests/Fixtures/GetSetObject.php +++ b/tests/Fixtures/GetSetObject.php @@ -18,9 +18,7 @@ class GetSetObject /** @Type("string") */ private $name = 'Foo'; - /** - * @ReadOnly - */ + /** @ReadOnly */ private $readOnlyProperty = 42; /** diff --git a/tests/Fixtures/GroupsObject.php b/tests/Fixtures/GroupsObject.php index ee56a8a09..59c862c4c 100644 --- a/tests/Fixtures/GroupsObject.php +++ b/tests/Fixtures/GroupsObject.php @@ -28,9 +28,7 @@ class GroupsObject */ private $bar; - /** - * @Type("string") - */ + /** @Type("string") */ private $none; public function __construct() diff --git a/tests/Fixtures/GroupsTrim.php b/tests/Fixtures/GroupsTrim.php index f6b7d16bb..d6b7eff98 100644 --- a/tests/Fixtures/GroupsTrim.php +++ b/tests/Fixtures/GroupsTrim.php @@ -6,14 +6,10 @@ class GroupsTrim { - /** - * @var int - */ + /** @var int */ private $amount; - /** - * @var string - */ + /** @var string */ private $currency; public function __construct($amount, $currency) diff --git a/tests/Fixtures/GroupsUser.php b/tests/Fixtures/GroupsUser.php index fbdef3038..c57c07da0 100644 --- a/tests/Fixtures/GroupsUser.php +++ b/tests/Fixtures/GroupsUser.php @@ -10,19 +10,13 @@ class GroupsUser { private $name; - /** - * @Groups({"nickname_group"}) - */ + /** @Groups({"nickname_group"}) */ private $nickname = 'nickname'; - /** - * @Groups({"manager_group"}) - */ + /** @Groups({"manager_group"}) */ private $manager; - /** - * @Groups({"friends_group"}) - */ + /** @Groups({"friends_group"}) */ private $friends; public function __construct($name, ?GroupsUser $manager = null, array $friends = []) diff --git a/tests/Fixtures/InlineChild.php b/tests/Fixtures/InlineChild.php index 4dc587030..ca5c2f144 100644 --- a/tests/Fixtures/InlineChild.php +++ b/tests/Fixtures/InlineChild.php @@ -8,13 +8,9 @@ class InlineChild { - /** - * @Type("string") - */ + /** @Type("string") */ public $a = 'a'; - /** - * @Type("string") - */ + /** @Type("string") */ public $b = 'b'; } diff --git a/tests/Fixtures/InlineParent.php b/tests/Fixtures/InlineParent.php index c4e725070..ddbba9b6f 100644 --- a/tests/Fixtures/InlineParent.php +++ b/tests/Fixtures/InlineParent.php @@ -10,14 +10,10 @@ /** @Serializer\AccessorOrder("alphabetical") */ class InlineParent { - /** - * @Type("string") - */ + /** @Type("string") */ private $c = 'c'; - /** - * @Type("string") - */ + /** @Type("string") */ private $d = 'd'; /** diff --git a/tests/Fixtures/InlineParentWithEmptyChild.php b/tests/Fixtures/InlineParentWithEmptyChild.php index 3db48a1e0..4064b4599 100644 --- a/tests/Fixtures/InlineParentWithEmptyChild.php +++ b/tests/Fixtures/InlineParentWithEmptyChild.php @@ -10,14 +10,10 @@ /** @Serializer\AccessorOrder("alphabetical") */ class InlineParentWithEmptyChild { - /** - * @Type("string") - */ + /** @Type("string") */ private $c = 'c'; - /** - * @Type("string") - */ + /** @Type("string") */ private $d = 'd'; /** diff --git a/tests/Fixtures/Input.php b/tests/Fixtures/Input.php index 72823cab3..b9e51809e 100644 --- a/tests/Fixtures/Input.php +++ b/tests/Fixtures/Input.php @@ -11,9 +11,7 @@ */ class Input { - /** - * @Serializer\XmlAttributeMap - */ + /** @Serializer\XmlAttributeMap */ private $attributes; public function __construct($attributes = null) diff --git a/tests/Fixtures/MaxDepth/Gh236Bar.php b/tests/Fixtures/MaxDepth/Gh236Bar.php index 4057faf52..ca8479cb2 100644 --- a/tests/Fixtures/MaxDepth/Gh236Bar.php +++ b/tests/Fixtures/MaxDepth/Gh236Bar.php @@ -8,9 +8,7 @@ class Gh236Bar { - /** - * @Serializer\Expose() - */ + /** @Serializer\Expose() */ public $xxx = 'yyy'; /** diff --git a/tests/Fixtures/MaxDepth/Gh236Foo.php b/tests/Fixtures/MaxDepth/Gh236Foo.php index 8a512bf05..feb53db7e 100644 --- a/tests/Fixtures/MaxDepth/Gh236Foo.php +++ b/tests/Fixtures/MaxDepth/Gh236Foo.php @@ -8,9 +8,7 @@ class Gh236Foo { - /** - * @Serializer\MaxDepth(1) - */ + /** @Serializer\MaxDepth(1) */ public $a; public function __construct() diff --git a/tests/Fixtures/MultilineGroupsFormat.php b/tests/Fixtures/MultilineGroupsFormat.php index b66b5325f..3a3ee43c5 100644 --- a/tests/Fixtures/MultilineGroupsFormat.php +++ b/tests/Fixtures/MultilineGroupsFormat.php @@ -6,14 +6,10 @@ class MultilineGroupsFormat { - /** - * @var int - */ + /** @var int */ private $amount; - /** - * @var string - */ + /** @var string */ private $currency; public function __construct($amount, $currency) diff --git a/tests/Fixtures/Node.php b/tests/Fixtures/Node.php index 01691b394..ddba20b81 100644 --- a/tests/Fixtures/Node.php +++ b/tests/Fixtures/Node.php @@ -8,9 +8,7 @@ class Node { - /** - * @Serializer\MaxDepth(2) - */ + /** @Serializer\MaxDepth(2) */ public $children; public $foo = 'bar'; diff --git a/tests/Fixtures/ObjectWithEmptyArrayAndHash.php b/tests/Fixtures/ObjectWithEmptyArrayAndHash.php index 69b9a2b08..437b3753d 100644 --- a/tests/Fixtures/ObjectWithEmptyArrayAndHash.php +++ b/tests/Fixtures/ObjectWithEmptyArrayAndHash.php @@ -19,9 +19,7 @@ class ObjectWithEmptyArrayAndHash */ private $array = []; - /** - * @Serializer\SkipWhenEmpty() - */ + /** @Serializer\SkipWhenEmpty() */ private $object = []; public function __construct() diff --git a/tests/Fixtures/ObjectWithInvalidExpression.php b/tests/Fixtures/ObjectWithInvalidExpression.php index 0351e71bf..b7f3e29bb 100644 --- a/tests/Fixtures/ObjectWithInvalidExpression.php +++ b/tests/Fixtures/ObjectWithInvalidExpression.php @@ -14,13 +14,9 @@ */ class ObjectWithInvalidExpression { - /** - * @var @Serializer\Exclude(if="inval") - */ + /** @var @Serializer\Exclude(if="inval") */ private $prop1; - /** - * @var @Serializer\Expose(if="invalid") - */ + /** @var @Serializer\Expose(if="invalid") */ private $prop2; } diff --git a/tests/Fixtures/ObjectWithLifecycleCallbacks.php b/tests/Fixtures/ObjectWithLifecycleCallbacks.php index 379c96996..31e8c7a53 100644 --- a/tests/Fixtures/ObjectWithLifecycleCallbacks.php +++ b/tests/Fixtures/ObjectWithLifecycleCallbacks.php @@ -12,19 +12,13 @@ class ObjectWithLifecycleCallbacks { - /** - * @Exclude - */ + /** @Exclude */ private $firstname; - /** - * @Exclude - */ + /** @Exclude */ private $lastname; - /** - * @Type("string") - */ + /** @Type("string") */ private $name; public function __construct($firstname = 'Foo', $lastname = 'Bar') diff --git a/tests/Fixtures/ObjectWithObjectProperty.php b/tests/Fixtures/ObjectWithObjectProperty.php index 804b9ab4b..038e2a878 100644 --- a/tests/Fixtures/ObjectWithObjectProperty.php +++ b/tests/Fixtures/ObjectWithObjectProperty.php @@ -8,14 +8,10 @@ class ObjectWithObjectProperty { - /** - * @Type("string") - */ + /** @Type("string") */ private $foo; - /** - * @Type("JMS\Serializer\Tests\Fixtures\Author") - */ + /** @Type("JMS\Serializer\Tests\Fixtures\Author") */ private $author; /** diff --git a/tests/Fixtures/ObjectWithVirtualProperties.php b/tests/Fixtures/ObjectWithVirtualProperties.php index b512a9512..babefd8db 100644 --- a/tests/Fixtures/ObjectWithVirtualProperties.php +++ b/tests/Fixtures/ObjectWithVirtualProperties.php @@ -15,9 +15,7 @@ */ class ObjectWithVirtualProperties { - /** - * @Type("string") - */ + /** @Type("string") */ protected $existField = 'value'; /** diff --git a/tests/Fixtures/ObjectWithXmlRootNamespace.php b/tests/Fixtures/ObjectWithXmlRootNamespace.php index d8fbfab3d..9e6f9b883 100644 --- a/tests/Fixtures/ObjectWithXmlRootNamespace.php +++ b/tests/Fixtures/ObjectWithXmlRootNamespace.php @@ -14,9 +14,7 @@ */ class ObjectWithXmlRootNamespace { - /** - * @Type("string") - */ + /** @Type("string") */ private $title; /** @@ -31,9 +29,7 @@ class ObjectWithXmlRootNamespace */ private $etag; - /** - * @Type("string") - */ + /** @Type("string") */ private $author; /** diff --git a/tests/Fixtures/ParentDoNotSkipWithEmptyChild.php b/tests/Fixtures/ParentDoNotSkipWithEmptyChild.php index 4dec2f550..825342a87 100644 --- a/tests/Fixtures/ParentDoNotSkipWithEmptyChild.php +++ b/tests/Fixtures/ParentDoNotSkipWithEmptyChild.php @@ -10,9 +10,7 @@ class ParentDoNotSkipWithEmptyChild private $d = 'd'; - /** - * @var InlineChild - */ + /** @var InlineChild */ private $child; public function __construct($child = null) diff --git a/tests/Fixtures/PersonAccount.php b/tests/Fixtures/PersonAccount.php index 5abaf1a58..3e08182fe 100644 --- a/tests/Fixtures/PersonAccount.php +++ b/tests/Fixtures/PersonAccount.php @@ -11,13 +11,9 @@ */ class PersonAccount { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; - /** - * @Serializer\Type("boolean") - */ + /** @Serializer\Type("boolean") */ public $expired; } diff --git a/tests/Fixtures/PersonAccountOnParent.php b/tests/Fixtures/PersonAccountOnParent.php index 31b081382..18a323b02 100644 --- a/tests/Fixtures/PersonAccountOnParent.php +++ b/tests/Fixtures/PersonAccountOnParent.php @@ -8,8 +8,6 @@ class PersonAccountOnParent extends PersonAccountParentWithExclude { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; } diff --git a/tests/Fixtures/PersonAccountParentWithExclude.php b/tests/Fixtures/PersonAccountParentWithExclude.php index 43c2884b8..2950e209c 100644 --- a/tests/Fixtures/PersonAccountParentWithExclude.php +++ b/tests/Fixtures/PersonAccountParentWithExclude.php @@ -11,8 +11,6 @@ */ class PersonAccountParentWithExclude { - /** - * @Serializer\Type("boolean") - */ + /** @Serializer\Type("boolean") */ public $expired; } diff --git a/tests/Fixtures/PersonAccountWithParent.php b/tests/Fixtures/PersonAccountWithParent.php index ed9cedb2b..4ecc72aca 100644 --- a/tests/Fixtures/PersonAccountWithParent.php +++ b/tests/Fixtures/PersonAccountWithParent.php @@ -11,13 +11,9 @@ */ class PersonAccountWithParent extends PersonAccountParent { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; - /** - * @Serializer\Type("boolean") - */ + /** @Serializer\Type("boolean") */ public $expired; } diff --git a/tests/Fixtures/PersonCollection.php b/tests/Fixtures/PersonCollection.php index 51dde36f3..5d8f25945 100644 --- a/tests/Fixtures/PersonCollection.php +++ b/tests/Fixtures/PersonCollection.php @@ -20,9 +20,7 @@ class PersonCollection */ public $persons; - /** - * @Type("string") - */ + /** @Type("string") */ public $location; public function __construct() diff --git a/tests/Fixtures/PersonLocation.php b/tests/Fixtures/PersonLocation.php index c918c203f..3fa3b3d14 100644 --- a/tests/Fixtures/PersonLocation.php +++ b/tests/Fixtures/PersonLocation.php @@ -12,13 +12,9 @@ */ class PersonLocation { - /** - * @Type("JMS\Serializer\Tests\Fixtures\Person") - */ + /** @Type("JMS\Serializer\Tests\Fixtures\Person") */ public $person; - /** - * @Type("string") - */ + /** @Type("string") */ public $location; } diff --git a/tests/Fixtures/PersonSecret.php b/tests/Fixtures/PersonSecret.php index 2affa8350..7c05694a0 100644 --- a/tests/Fixtures/PersonSecret.php +++ b/tests/Fixtures/PersonSecret.php @@ -12,9 +12,7 @@ */ class PersonSecret { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; /** diff --git a/tests/Fixtures/PersonSecretVirtual.php b/tests/Fixtures/PersonSecretVirtual.php index d75ef401c..a5eea678a 100644 --- a/tests/Fixtures/PersonSecretVirtual.php +++ b/tests/Fixtures/PersonSecretVirtual.php @@ -12,14 +12,10 @@ */ class PersonSecretVirtual { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; - /** - * @Serializer\Exclude() - */ + /** @Serializer\Exclude() */ public $gender; /** diff --git a/tests/Fixtures/PersonSecretWithVariables.php b/tests/Fixtures/PersonSecretWithVariables.php index 810c3ebfb..8d53fbaa2 100644 --- a/tests/Fixtures/PersonSecretWithVariables.php +++ b/tests/Fixtures/PersonSecretWithVariables.php @@ -10,9 +10,7 @@ class PersonSecretWithVariables { - /** - * @Serializer\Type("string") - */ + /** @Serializer\Type("string") */ public $name; /** diff --git a/tests/Fixtures/Timestamp.php b/tests/Fixtures/Timestamp.php index 376fac8a3..88343d284 100755 --- a/tests/Fixtures/Timestamp.php +++ b/tests/Fixtures/Timestamp.php @@ -8,9 +8,7 @@ class Timestamp { - /** - * @Type("DateTime<'U'>") - */ + /** @Type("DateTime<'U'>") */ private $timestamp; public function __construct($timestamp) diff --git a/tests/Fixtures/Tree.php b/tests/Fixtures/Tree.php index bbc895e45..c6f7c04c7 100644 --- a/tests/Fixtures/Tree.php +++ b/tests/Fixtures/Tree.php @@ -8,9 +8,7 @@ class Tree { - /** - * @Serializer\MaxDepth(10) - */ + /** @Serializer\MaxDepth(10) */ public $tree; public function __construct($tree) diff --git a/tests/Fixtures/TypedProperties/User.php b/tests/Fixtures/TypedProperties/User.php index 922ab54c4..f516a133b 100644 --- a/tests/Fixtures/TypedProperties/User.php +++ b/tests/Fixtures/TypedProperties/User.php @@ -13,12 +13,8 @@ class User public Vehicle $vehicle; public \DateTime $created; - /** - * @Serializer\ReadOnly() - */ + /** @Serializer\ReadOnly() */ public ?\DateTimeInterface $updated = null; - /** - * @Serializer\ReadOnly() - */ + /** @Serializer\ReadOnly() */ public iterable $tags = []; } diff --git a/tests/Fixtures/VehicleInterfaceGarage.php b/tests/Fixtures/VehicleInterfaceGarage.php index 6496d3b1c..6abc29f23 100644 --- a/tests/Fixtures/VehicleInterfaceGarage.php +++ b/tests/Fixtures/VehicleInterfaceGarage.php @@ -8,9 +8,7 @@ class VehicleInterfaceGarage { - /** - * @Type("array") - */ + /** @Type("array") */ public $vehicles; public function __construct($vehicles) diff --git a/tests/Fixtures/VersionedObject.php b/tests/Fixtures/VersionedObject.php index 57e6025a1..95e1ea2ef 100644 --- a/tests/Fixtures/VersionedObject.php +++ b/tests/Fixtures/VersionedObject.php @@ -10,9 +10,7 @@ class VersionedObject { - /** - * @Until("1.0.0") - */ + /** @Until("1.0.0") */ private $name; /** diff --git a/tests/Handler/ArrayCollectionDepthTest.php b/tests/Handler/ArrayCollectionDepthTest.php index dd1a69a1d..a92ca3d5d 100644 --- a/tests/Handler/ArrayCollectionDepthTest.php +++ b/tests/Handler/ArrayCollectionDepthTest.php @@ -49,9 +49,7 @@ public static function getCollections() class CollectionWrapper { - /** - * @Serializer\MaxDepth(2) - */ + /** @Serializer\MaxDepth(2) */ public $collection; public function __construct($collection) diff --git a/tests/Handler/DateHandlerTest.php b/tests/Handler/DateHandlerTest.php index 5b099557d..141b5dc40 100644 --- a/tests/Handler/DateHandlerTest.php +++ b/tests/Handler/DateHandlerTest.php @@ -13,13 +13,9 @@ class DateHandlerTest extends TestCase { - /** - * @var DateHandler - */ + /** @var DateHandler */ private $handler; - /** - * @var \DateTimeZone - */ + /** @var \DateTimeZone */ private $timezone; protected function setUp(): void diff --git a/tests/Handler/FormErrorHandlerTest.php b/tests/Handler/FormErrorHandlerTest.php index 47cdfbe68..20d4ea0f0 100644 --- a/tests/Handler/FormErrorHandlerTest.php +++ b/tests/Handler/FormErrorHandlerTest.php @@ -30,24 +30,16 @@ class FormErrorHandlerTest extends TestCase { - /** - * @var FormErrorHandler - */ + /** @var FormErrorHandler */ protected $handler; - /** - * @var JsonSerializationVisitor - */ + /** @var JsonSerializationVisitor */ protected $visitor; - /** - * @var EventDispatcherInterface - */ + /** @var EventDispatcherInterface */ protected $dispatcher; - /** - * @var FormFactoryInterface - */ + /** @var FormFactoryInterface */ protected $factory; protected function setUp(): void diff --git a/tests/Handler/IteratorHandlerTest.php b/tests/Handler/IteratorHandlerTest.php index 1c9169133..fc4f72b42 100644 --- a/tests/Handler/IteratorHandlerTest.php +++ b/tests/Handler/IteratorHandlerTest.php @@ -17,9 +17,7 @@ final class IteratorHandlerTest extends TestCase { private const DATA = ['foo', 'bar']; - /** - * @var HandlerRegistry - */ + /** @var HandlerRegistry */ private $handlerRegistry; public function iteratorsProvider(): array diff --git a/tests/Serializer/BaseSerializationTest.php b/tests/Serializer/BaseSerializationTest.php index 83f74055b..e0522524d 100644 --- a/tests/Serializer/BaseSerializationTest.php +++ b/tests/Serializer/BaseSerializationTest.php @@ -132,17 +132,13 @@ abstract class BaseSerializationTest extends TestCase { protected $factory; - /** - * @var EventDispatcher - */ + /** @var EventDispatcher */ protected $dispatcher; /** @var Serializer */ protected $serializer; - /** - * @var HandlerRegistryInterface - */ + /** @var HandlerRegistryInterface */ protected $handlerRegistry; protected $serializationVisitors; protected $deserializationVisitors; diff --git a/tests/Serializer/EventDispatcher/EventDispatcherTest.php b/tests/Serializer/EventDispatcher/EventDispatcherTest.php index 7a05ca644..db3dde88d 100644 --- a/tests/Serializer/EventDispatcher/EventDispatcherTest.php +++ b/tests/Serializer/EventDispatcher/EventDispatcherTest.php @@ -18,9 +18,7 @@ class EventDispatcherTest extends TestCase { - /** - * @var EventDispatcher - */ + /** @var EventDispatcher */ protected $dispatcher; protected $event; protected $context; diff --git a/tests/Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriberTest.php b/tests/Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriberTest.php index 040632dd4..a474647b6 100644 --- a/tests/Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriberTest.php +++ b/tests/Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriberTest.php @@ -24,9 +24,7 @@ class DoctrineProxySubscriberTest extends TestCase /** @var DoctrineProxySubscriber */ private $subscriber; - /** - * @var EventDispatcher - */ + /** @var EventDispatcher */ private $dispatcher; public function testRewritesProxyClassName()