Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
mustanggb authored Feb 25, 2024
1 parent b70e38c commit 31855b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Form/DataTransformer/CurrencyToArrayTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CurrencyToArrayTransformer implements DataTransformerInterface
*
* @psalm-param TValue|null $value

Check failure on line 24 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

UndefinedDocblockClass

src/Form/DataTransformer/CurrencyToArrayTransformer.php:24:21: UndefinedDocblockClass: Docblock-defined class, interface or enum named Tbbc\MoneyBundle\Form\DataTransformer\TValue does not exist (see https://psalm.dev/200)
*/
public function transform(?Currency $value): ?array
public function transform(mixed $value): ?array

Check failure on line 26 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

ImplementedParamTypeMismatch

src/Form/DataTransformer/CurrencyToArrayTransformer.php:26:37: ImplementedParamTypeMismatch: Argument 1 of Tbbc\MoneyBundle\Form\DataTransformer\CurrencyToArrayTransformer::transform has wrong type 'Tbbc\MoneyBundle\Form\DataTransformer\TValue|null', expecting 'Money\Currency|null' as defined by Symfony\Component\Form\DataTransformerInterface::transform (see https://psalm.dev/199)

Check failure on line 26 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

MixedInferredReturnType

src/Form/DataTransformer/CurrencyToArrayTransformer.php:26:46: MixedInferredReturnType: Could not verify return type 'array<array-key, mixed>|null' for Tbbc\MoneyBundle\Form\DataTransformer\CurrencyToArrayTransformer::transform (see https://psalm.dev/047)
{
if (null === $value) {
return null;
Expand All @@ -40,7 +40,7 @@ public function transform(?Currency $value): ?array
*
* @psalm-param TTransformedValue|null $value

Check failure on line 41 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

UndefinedDocblockClass

src/Form/DataTransformer/CurrencyToArrayTransformer.php:41:21: UndefinedDocblockClass: Docblock-defined class, interface or enum named Tbbc\MoneyBundle\Form\DataTransformer\TTransformedValue does not exist (see https://psalm.dev/200)
*/
public function reverseTransform(array $value): ?Currency
public function reverseTransform(mixed $value): ?Currency

Check failure on line 43 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

ImplementedParamTypeMismatch

src/Form/DataTransformer/CurrencyToArrayTransformer.php:43:44: ImplementedParamTypeMismatch: Argument 1 of Tbbc\MoneyBundle\Form\DataTransformer\CurrencyToArrayTransformer::reverseTransform has wrong type 'Tbbc\MoneyBundle\Form\DataTransformer\TTransformedValue|null', expecting 'array<array-key, mixed>|null' as defined by Symfony\Component\Form\DataTransformerInterface::reverseTransform (see https://psalm.dev/199)

Check failure on line 43 in src/Form/DataTransformer/CurrencyToArrayTransformer.php

View workflow job for this annotation

GitHub Actions / psalm

MixedInferredReturnType

src/Form/DataTransformer/CurrencyToArrayTransformer.php:43:53: MixedInferredReturnType: Could not verify return type 'Money\Currency|null' for Tbbc\MoneyBundle\Form\DataTransformer\CurrencyToArrayTransformer::reverseTransform (see https://psalm.dev/047)
{
if (null === $value) {
return null;
Expand Down

0 comments on commit 31855b6

Please sign in to comment.