diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a6863b6..31eeb01 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -15,11 +15,6 @@ parameters: count: 3 path: src/Comparator/ComparatorLocator.php - - - message: "#^Parameter \\#2 \\$encoders of class Symfony\\\\Component\\\\Serializer\\\\Serializer constructor expects array\\, array\\ given\\.$#" - count: 1 - path: src/Creator/AbstractSymfonySerializerCreator.php - - message: "#^Unsafe access to private property Pock\\\\Factory\\\\JsonSerializerFactory\\:\\:\\$mainSerializer through static\\:\\:\\.$#" count: 2 diff --git a/src/Creator/AbstractJmsSerializerCreator.php b/src/Creator/AbstractJmsSerializerCreator.php index 7786f69..0e2f63e 100644 --- a/src/Creator/AbstractJmsSerializerCreator.php +++ b/src/Creator/AbstractJmsSerializerCreator.php @@ -30,13 +30,13 @@ abstract class AbstractJmsSerializerCreator implements SerializerCreatorInterfac { if ( class_exists(self::BUILDER_CLASS) && - method_exists(self::BUILDER_CLASS, 'create') + method_exists(self::BUILDER_CLASS, 'create') // @phpstan-ignore-line ) { try { - $builder = call_user_func([self::BUILDER_CLASS, 'create']); + $builder = call_user_func([self::BUILDER_CLASS, 'create']); // @phpstan-ignore-line - if (null !== $builder && method_exists($builder, 'build')) { - return new JmsSerializerAdapter($builder->build(), static::getFormat()); + if (null !== $builder && method_exists($builder, 'build')) { // @phpstan-ignore-line + return new JmsSerializerAdapter($builder->build(), static::getFormat()); // @phpstan-ignore-line } } catch (Throwable $throwable) { return null; diff --git a/src/Creator/AbstractSymfonySerializerCreator.php b/src/Creator/AbstractSymfonySerializerCreator.php index e6b0484..b4cfa76 100644 --- a/src/Creator/AbstractSymfonySerializerCreator.php +++ b/src/Creator/AbstractSymfonySerializerCreator.php @@ -34,7 +34,7 @@ abstract class AbstractSymfonySerializerCreator implements SerializerCreatorInte $encoder = static::getEncoderClass(); return new SymfonySerializerAdapter( - new $serializer([new $normalizer()], [new $encoder()]), + new $serializer([new $normalizer()], [new $encoder()]), // @phpstan-ignore-line static::getFormat() ); }