From 3b025512a3381ec0a38daebdcef602341b9da870 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 14 Feb 2024 13:15:53 +0000 Subject: [PATCH 1/3] Rename UnionDecorator to PrettyPrinter --- src/Command/PsalmTypeCommand.php | 4 +- src/Command/PsalmTypeCommandFactory.php | 4 +- src/ConfigProvider.php | 8 ++-- src/Decorator/ArrayDecorator.php | 2 +- src/Decorator/KeyedArrayDecorator.php | 2 +- .../{UnionDecorator.php => PrettyPrinter.php} | 6 +-- ...orFactory.php => PrettyPrinterFactory.php} | 6 +-- ...orInterface.php => DecoratorInterface.php} | 2 +- test/Command/PsalmTypeCommandFactoryTest.php | 6 +-- test/Command/PsalmTypeCommandTest.php | 4 +- ...yTest.php => PrettyPrinterFactoryTest.php} | 10 ++--- ...ecoratorTest.php => PrettyPrinterTest.php} | 41 ++++++++++++++++--- test/Form/FormCollectionSmokeTest.php | 8 ++-- test/Form/FormElementSmokeTest.php | 4 +- test/Form/FormFieldsetSmokeTest.php | 4 +- 15 files changed, 70 insertions(+), 41 deletions(-) rename src/Decorator/{UnionDecorator.php => PrettyPrinter.php} (96%) rename src/Decorator/{UnionDecoratorFactory.php => PrettyPrinterFactory.php} (72%) rename src/{UnionDecoratorInterface.php => DecoratorInterface.php} (82%) rename test/Decorator/{UnionDecoratorFactoryTest.php => PrettyPrinterFactoryTest.php} (87%) rename test/Decorator/{UnionDecoratorTest.php => PrettyPrinterTest.php} (85%) diff --git a/src/Command/PsalmTypeCommand.php b/src/Command/PsalmTypeCommand.php index 39a33e5..fd33e1e 100644 --- a/src/Command/PsalmTypeCommand.php +++ b/src/Command/PsalmTypeCommand.php @@ -4,10 +4,10 @@ namespace Kynx\Laminas\FormShape\Command; +use Kynx\Laminas\FormShape\DecoratorInterface; use Kynx\Laminas\FormShape\File\FormReaderInterface; use Kynx\Laminas\FormShape\Form\FormVisitorInterface; use Kynx\Laminas\FormShape\InputFilter\InputVisitorException; -use Kynx\Laminas\FormShape\UnionDecoratorInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -19,7 +19,7 @@ final class PsalmTypeCommand extends Command public function __construct( private readonly FormReaderInterface $formReader, private readonly FormVisitorInterface $formVisitor, - private readonly UnionDecoratorInterface $decorator, + private readonly DecoratorInterface $decorator, ) { parent::__construct(); } diff --git a/src/Command/PsalmTypeCommandFactory.php b/src/Command/PsalmTypeCommandFactory.php index e75bc5e..af91451 100644 --- a/src/Command/PsalmTypeCommandFactory.php +++ b/src/Command/PsalmTypeCommandFactory.php @@ -4,9 +4,9 @@ namespace Kynx\Laminas\FormShape\Command; +use Kynx\Laminas\FormShape\DecoratorInterface; use Kynx\Laminas\FormShape\File\FormReader; use Kynx\Laminas\FormShape\Form\FormVisitorInterface; -use Kynx\Laminas\FormShape\UnionDecoratorInterface; use Psr\Container\ContainerInterface; final readonly class PsalmTypeCommandFactory @@ -16,7 +16,7 @@ public function __invoke(ContainerInterface $container): PsalmTypeCommand return new PsalmTypeCommand( $container->get(FormReader::class), $container->get(FormVisitorInterface::class), - $container->get(UnionDecoratorInterface::class) + $container->get(DecoratorInterface::class) ); } } diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 02f981c..1243677 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -6,8 +6,8 @@ use Kynx\Laminas\FormShape\Command\PsalmTypeCommand; use Kynx\Laminas\FormShape\Command\PsalmTypeCommandFactory; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; -use Kynx\Laminas\FormShape\Decorator\UnionDecoratorFactory; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinterFactory; use Kynx\Laminas\FormShape\File\FormReader; use Kynx\Laminas\FormShape\File\FormReaderFactory; use Kynx\Laminas\FormShape\Filter\AllowListVisitor; @@ -206,7 +206,7 @@ private function getDependencyConfig(): array 'aliases' => [ FormVisitorInterface::class => FormVisitor::class, InputFilterVisitorInterface::class => InputFilterVisitor::class, - UnionDecoratorInterface::class => UnionDecorator::class, + DecoratorInterface::class => PrettyPrinter::class, ], 'factories' => [ AllowListVisitor::class => AllowListVisitorFactory::class, @@ -222,7 +222,7 @@ private function getDependencyConfig(): array InputVisitor::class => InputVisitorFactory::class, NonEmptyStringVisitor::class => NonEmptyStringVisitorFactory::class, RegexVisitor::class => RegexVisitorFactory::class, - UnionDecorator::class => UnionDecoratorFactory::class, + PrettyPrinter::class => PrettyPrinterFactory::class, ], ]; } diff --git a/src/Decorator/ArrayDecorator.php b/src/Decorator/ArrayDecorator.php index 2bde88e..c08db18 100644 --- a/src/Decorator/ArrayDecorator.php +++ b/src/Decorator/ArrayDecorator.php @@ -10,7 +10,7 @@ final readonly class ArrayDecorator { - public function __construct(private UnionDecorator $unionDecorator) + public function __construct(private PrettyPrinter $unionDecorator) { } diff --git a/src/Decorator/KeyedArrayDecorator.php b/src/Decorator/KeyedArrayDecorator.php index 6c1f044..2492f11 100644 --- a/src/Decorator/KeyedArrayDecorator.php +++ b/src/Decorator/KeyedArrayDecorator.php @@ -17,7 +17,7 @@ final readonly class KeyedArrayDecorator { - public function __construct(private UnionDecorator $unionDecorator) + public function __construct(private PrettyPrinter $unionDecorator) { } diff --git a/src/Decorator/UnionDecorator.php b/src/Decorator/PrettyPrinter.php similarity index 96% rename from src/Decorator/UnionDecorator.php rename to src/Decorator/PrettyPrinter.php index de6d7b2..f730bc6 100644 --- a/src/Decorator/UnionDecorator.php +++ b/src/Decorator/PrettyPrinter.php @@ -4,7 +4,7 @@ namespace Kynx\Laminas\FormShape\Decorator; -use Kynx\Laminas\FormShape\UnionDecoratorInterface; +use Kynx\Laminas\FormShape\DecoratorInterface; use Psalm\Type; use Psalm\Type\Atomic; use Psalm\Type\Atomic\TArray; @@ -21,7 +21,7 @@ use const SORT_STRING; -final readonly class UnionDecorator implements UnionDecoratorInterface +final readonly class PrettyPrinter implements DecoratorInterface { private ArrayDecorator $arrayDecorator; private KeyedArrayDecorator $keyedArrayDecorator; @@ -42,7 +42,7 @@ public function decorate(Union $union, int $indent = 0): string foreach ($union->getAtomicTypes() as $type) { if ($type instanceof TArray) { - $types[] = $this->arrayDecorator->decorate($type); + $types[] = $this->arrayDecorator->decorate($type, $indent); } elseif ($type instanceof TKeyedArray) { $types[] = $this->keyedArrayDecorator->decorate($type, $indent); } diff --git a/src/Decorator/UnionDecoratorFactory.php b/src/Decorator/PrettyPrinterFactory.php similarity index 72% rename from src/Decorator/UnionDecoratorFactory.php rename to src/Decorator/PrettyPrinterFactory.php index cdd5e41..a1e6381 100644 --- a/src/Decorator/UnionDecoratorFactory.php +++ b/src/Decorator/PrettyPrinterFactory.php @@ -11,9 +11,9 @@ /** * @psalm-import-type FormShapeConfigurationArray from ConfigProvider */ -final readonly class UnionDecoratorFactory +final readonly class PrettyPrinterFactory { - public function __invoke(ContainerInterface $container): UnionDecorator + public function __invoke(ContainerInterface $container): PrettyPrinter { /** @var FormShapeConfigurationArray $config */ $config = $container->get('config') ?? []; @@ -21,6 +21,6 @@ public function __invoke(ContainerInterface $container): UnionDecorator ConfigLoader::load($shapeConfig['max-string-length'] ?? null); - return new UnionDecorator($shapeConfig['indent'], $shapeConfig['literal-limit']); + return new PrettyPrinter($shapeConfig['indent'], $shapeConfig['literal-limit']); } } diff --git a/src/UnionDecoratorInterface.php b/src/DecoratorInterface.php similarity index 82% rename from src/UnionDecoratorInterface.php rename to src/DecoratorInterface.php index 60a42e1..c007d33 100644 --- a/src/UnionDecoratorInterface.php +++ b/src/DecoratorInterface.php @@ -6,7 +6,7 @@ use Psalm\Type\Union; -interface UnionDecoratorInterface +interface DecoratorInterface { public function decorate(Union $union, int $indent = 0): string; } diff --git a/test/Command/PsalmTypeCommandFactoryTest.php b/test/Command/PsalmTypeCommandFactoryTest.php index b2228f7..9bc0ef2 100644 --- a/test/Command/PsalmTypeCommandFactoryTest.php +++ b/test/Command/PsalmTypeCommandFactoryTest.php @@ -5,12 +5,12 @@ namespace KynxTest\Laminas\FormShape\Command; use Kynx\Laminas\FormShape\Command\PsalmTypeCommandFactory; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; +use Kynx\Laminas\FormShape\DecoratorInterface; use Kynx\Laminas\FormShape\File\FormFile; use Kynx\Laminas\FormShape\File\FormReader; use Kynx\Laminas\FormShape\File\FormReaderInterface; use Kynx\Laminas\FormShape\Form\FormVisitorInterface; -use Kynx\Laminas\FormShape\UnionDecoratorInterface; use Laminas\Form\Form; use Nette\PhpGenerator\PhpFile; use PHPUnit\Framework\Attributes\CoversClass; @@ -33,7 +33,7 @@ public function testInvokeReturnsConfiguredInstance(): void ->willReturnMap([ [FormReader::class, $formReader], [FormVisitorInterface::class, $formVisitor], - [UnionDecoratorInterface::class, new UnionDecorator()], + [DecoratorInterface::class, new PrettyPrinter()], ]); $factory = new PsalmTypeCommandFactory(); diff --git a/test/Command/PsalmTypeCommandTest.php b/test/Command/PsalmTypeCommandTest.php index 4f2025c..5952504 100644 --- a/test/Command/PsalmTypeCommandTest.php +++ b/test/Command/PsalmTypeCommandTest.php @@ -5,7 +5,7 @@ namespace KynxTest\Laminas\FormShape\Command; use Kynx\Laminas\FormShape\Command\PsalmTypeCommand; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use Kynx\Laminas\FormShape\File\FormFile; use Kynx\Laminas\FormShape\File\FormReaderInterface; use Kynx\Laminas\FormShape\Form\FormVisitorInterface; @@ -34,7 +34,7 @@ protected function setUp(): void $this->formReader = self::createStub(FormReaderInterface::class); $this->formVisitor = self::createStub(FormVisitorInterface::class); - $decorator = new UnionDecorator(); + $decorator = new PrettyPrinter(); $command = new PsalmTypeCommand( $this->formReader, diff --git a/test/Decorator/UnionDecoratorFactoryTest.php b/test/Decorator/PrettyPrinterFactoryTest.php similarity index 87% rename from test/Decorator/UnionDecoratorFactoryTest.php rename to test/Decorator/PrettyPrinterFactoryTest.php index ba2e28e..71aa6a5 100644 --- a/test/Decorator/UnionDecoratorFactoryTest.php +++ b/test/Decorator/PrettyPrinterFactoryTest.php @@ -4,7 +4,7 @@ namespace KynxTest\Laminas\FormShape\Decorator; -use Kynx\Laminas\FormShape\Decorator\UnionDecoratorFactory; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinterFactory; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psalm\Type\Atomic\TInt; @@ -15,8 +15,8 @@ use function array_merge; -#[CoversClass(UnionDecoratorFactory::class)] -final class UnionDecoratorFactoryTest extends TestCase +#[CoversClass(PrettyPrinterFactory::class)] +final class PrettyPrinterFactoryTest extends TestCase { public function testInvokeReturnsInstanceWithIndent(): void { @@ -25,7 +25,7 @@ public function testInvokeReturnsInstanceWithIndent(): void $container->method('get') ->willReturnMap([['config', $config]]); - $factory = new UnionDecoratorFactory(); + $factory = new PrettyPrinterFactory(); $instance = $factory($container); $expected = "array{\n\tfoo: int,\n}"; @@ -46,7 +46,7 @@ public function testInvokeReturnsInstanceConfiguredWithLiteralLimit(): void $container->method('get') ->willReturnMap([['config', $config]]); - $factory = new UnionDecoratorFactory(); + $factory = new PrettyPrinterFactory(); $instance = $factory($container); $expected = "int<0, max>"; // hrm... psalm could narrow this better ;) diff --git a/test/Decorator/UnionDecoratorTest.php b/test/Decorator/PrettyPrinterTest.php similarity index 85% rename from test/Decorator/UnionDecoratorTest.php rename to test/Decorator/PrettyPrinterTest.php index c95fd5f..f41f20f 100644 --- a/test/Decorator/UnionDecoratorTest.php +++ b/test/Decorator/PrettyPrinterTest.php @@ -5,12 +5,13 @@ namespace KynxTest\Laminas\FormShape\Decorator; use Kynx\Laminas\FormShape\Decorator\DecoratorException; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use Kynx\Laminas\FormShape\Psalm\ConfigLoader; use Kynx\Laminas\FormShape\Psalm\TypeUtil; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; +use Psalm\Type; use Psalm\Type\Atomic; use Psalm\Type\Atomic\TArray; use Psalm\Type\Atomic\TBool; @@ -38,16 +39,16 @@ use function array_map; use function range; -#[CoversClass(UnionDecorator::class)] -final class UnionDecoratorTest extends TestCase +#[CoversClass(PrettyPrinter::class)] +final class PrettyPrinterTest extends TestCase { - private UnionDecorator $decorator; + private PrettyPrinter $decorator; protected function setUp(): void { parent::setUp(); - $this->decorator = new UnionDecorator(); + $this->decorator = new PrettyPrinter(); } public function testDecorateEmptyUnionThrowsException(): void @@ -91,6 +92,34 @@ public function testDecorateReturnsKeyedArray(): void self::assertSame($expected, $actual); } + public function testDecorateIndentsArrayWithKeyedArray(): void + { + $expected = <<, + } + END_OF_EXPECTED; + $union = new Union([ + new TKeyedArray([ + 'foo' => new Union([ + new TArray([ + Type::getArrayKey(), + new Union([ + new TKeyedArray([ + 'bar' => new Union([new TInt()]), + ]), + ]), + ]), + ]), + ]), + ]); + + $actual = $this->decorator->decorate($union); + self::assertSame($expected, $actual); + } + public function testDecorateSortsTypes(): void { $expected = "'1'|'b'|1|float|null"; @@ -175,7 +204,7 @@ public function testDecorateLimitsLiterals(): void range(1, 4) ); $union = new Union($types); - $decorator = new UnionDecorator('', 3); + $decorator = new PrettyPrinter('', 3); $actual = $decorator->decorate($union); self::assertSame($expected, $actual); diff --git a/test/Form/FormCollectionSmokeTest.php b/test/Form/FormCollectionSmokeTest.php index 248dfbc..44bf8bb 100644 --- a/test/Form/FormCollectionSmokeTest.php +++ b/test/Form/FormCollectionSmokeTest.php @@ -4,7 +4,7 @@ namespace Form; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use Kynx\Laminas\FormShape\Form\FormVisitor; use Kynx\Laminas\FormShape\InputFilter\CollectionInputVisitor; use Kynx\Laminas\FormShape\InputFilter\InputFilterVisitor; @@ -59,7 +59,7 @@ public function testValidationMatches(ElementInterface $element, array $data, bo $union = $this->visitor->visit($form); - $type = (new UnionDecorator())->decorate($union); + $type = (new PrettyPrinter())->decorate($union); $form->setData($data); $isFormValid = $form->isValid(); @@ -104,7 +104,7 @@ public function testCountAllowRemove(array $data, int $count, bool $allowRemove, $union = $this->visitor->visit($form); - $type = (new UnionDecorator())->decorate($union); + $type = (new PrettyPrinter())->decorate($union); self::assertValinorValidates($isValid, $type, $data); if ($isValid) { @@ -150,7 +150,7 @@ public function testElementAsTargetElementValidates(): void $isValid = $form->isValid(); self::assertTrue($isValid); - $actual = (new UnionDecorator())->decorate($union); + $actual = (new PrettyPrinter())->decorate($union); self::assertValinorValidates(true, $actual, $data); self::assertSame($expected, $actual); diff --git a/test/Form/FormElementSmokeTest.php b/test/Form/FormElementSmokeTest.php index b83bc3c..24f3b90 100644 --- a/test/Form/FormElementSmokeTest.php +++ b/test/Form/FormElementSmokeTest.php @@ -4,7 +4,7 @@ namespace KynxTest\Laminas\FormShape\Form; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use Kynx\Laminas\FormShape\InputFilterVisitorInterface; use Kynx\Laminas\FormShape\Psalm\ConfigLoader; use Laminas\Form\Element\Button; @@ -69,7 +69,7 @@ public function testDefaultElements(string $element, array $tests, string $expec $inputFilter = $form->getInputFilter(); $union = $visitor->visit($inputFilter); - $decorator = new UnionDecorator(); + $decorator = new PrettyPrinter(); /** @psalm-suppress PossiblyInvalidArgument */ $actualString = $decorator->decorate($union); diff --git a/test/Form/FormFieldsetSmokeTest.php b/test/Form/FormFieldsetSmokeTest.php index e3bfa59..3b1d477 100644 --- a/test/Form/FormFieldsetSmokeTest.php +++ b/test/Form/FormFieldsetSmokeTest.php @@ -4,7 +4,7 @@ namespace Form; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use Kynx\Laminas\FormShape\Form\FormVisitor; use Kynx\Laminas\FormShape\InputFilter\CollectionInputVisitor; use Kynx\Laminas\FormShape\InputFilter\InputFilterVisitor; @@ -56,7 +56,7 @@ public function testValidationMatches(array $elements, array $data, bool $isVali $form->add($fieldset); $union = $this->visitor->visit($form); - $type = (new UnionDecorator())->decorate($union); + $type = (new PrettyPrinter())->decorate($union); $form->setData($data); $formValid = $form->isValid(); From bc875beddf0cf5b2d48a7b9dff39b2668d2c1411 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 14 Feb 2024 13:16:55 +0000 Subject: [PATCH 2/3] Fix indentation of arrays with keyed array values --- psalm-baseline.xml | 110 ++++++++++----------- src/Decorator/ArrayDecorator.php | 9 +- test/Decorator/ArrayDecoratorTest.php | 4 +- test/Decorator/KeyedArrayDecoratorTest.php | 4 +- 4 files changed, 66 insertions(+), 61 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index e0fcbfc..e8b9e50 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,216 +1,216 @@ - + - $file + - aliasProvider - factoryProvider - filterVisitorsProvider - regexPatternProvider - validatorVisitorsProvider + + + + + - typeNameProvider + - + - combineTypesProvider - typeProvider + + - getFormFileProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - countAllowRemoveProvider - validationMatchesProvider + + - defaultElementProvider + - validationMatchProvider + - collectionProvider + - addNotEmptyProvider + - reloadConfig + - isContainedByFalseProvider - isContainedByTrueProvider + + - filterProvider - narrowProvider - replaceTypeProvider - toLaxUnion - toStrictUnionProvider - widenProvider + + + + + + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - defaultValidatorProvider - visitProvider + + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + - visitProvider + diff --git a/src/Decorator/ArrayDecorator.php b/src/Decorator/ArrayDecorator.php index c08db18..895ba69 100644 --- a/src/Decorator/ArrayDecorator.php +++ b/src/Decorator/ArrayDecorator.php @@ -14,9 +14,14 @@ public function __construct(private PrettyPrinter $unionDecorator) { } - public function decorate(TArray $array): string + public function decorate(TArray $array, int $indent = 0): string { [$key, $value] = $array->type_params; - return sprintf('%s<%s, %s>', $array->value, $key->getKey(), $this->unionDecorator->decorate($value)); + return sprintf( + '%s<%s, %s>', + $array->value, + $key->getKey(), + $this->unionDecorator->decorate($value, $indent) + ); } } diff --git a/test/Decorator/ArrayDecoratorTest.php b/test/Decorator/ArrayDecoratorTest.php index 9216a4a..91e14ad 100644 --- a/test/Decorator/ArrayDecoratorTest.php +++ b/test/Decorator/ArrayDecoratorTest.php @@ -5,7 +5,7 @@ namespace KynxTest\Laminas\FormShape\Decorator; use Kynx\Laminas\FormShape\Decorator\ArrayDecorator; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psalm\Type\Atomic\TArray; @@ -25,7 +25,7 @@ protected function setUp(): void { parent::setUp(); - $this->decorator = new ArrayDecorator(new UnionDecorator()); + $this->decorator = new ArrayDecorator(new PrettyPrinter()); } public function testDecorateReturnsNonEmptyArray(): void diff --git a/test/Decorator/KeyedArrayDecoratorTest.php b/test/Decorator/KeyedArrayDecoratorTest.php index 15532f9..8d17e38 100644 --- a/test/Decorator/KeyedArrayDecoratorTest.php +++ b/test/Decorator/KeyedArrayDecoratorTest.php @@ -5,7 +5,7 @@ namespace KynxTest\Laminas\FormShape\Decorator; use Kynx\Laminas\FormShape\Decorator\KeyedArrayDecorator; -use Kynx\Laminas\FormShape\Decorator\UnionDecorator; +use Kynx\Laminas\FormShape\Decorator\PrettyPrinter; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; @@ -24,7 +24,7 @@ protected function setUp(): void { parent::setUp(); - $this->decorator = new KeyedArrayDecorator(new UnionDecorator()); + $this->decorator = new KeyedArrayDecorator(new PrettyPrinter()); } #[DataProvider('typeNameProvider')] From 089156bed28d27ee153a270e5d11cc00ebf7a854 Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 14 Feb 2024 13:17:41 +0000 Subject: [PATCH 3/3] Add more export-ignore --- .gitattributes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 1eab914..303f66c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,8 +2,10 @@ /test/ export-ignore /.gitattributes export-ignore /.gitignore export-ignore +/.markdownlint.json export-ignore /.psr-container.php.stub export-ignore /composer.lock export-ignore /phpcs.xml export-ignore /phpunit.xml.dist export-ignore -/psalm.xml export-ignore \ No newline at end of file +/psalm.xml export-ignore +/psalm-baseline.xml export-ignore \ No newline at end of file