Fix psalm errors #67
code_checks.yaml
on: pull_request
Annotations
15 errors
MissingTemplateParam:
src/Form/DataTransformer/CurrencyToArrayTransformer.php#L17
src/Form/DataTransformer/CurrencyToArrayTransformer.php:17:45: MissingTemplateParam: Tbbc\MoneyBundle\Form\DataTransformer\CurrencyToArrayTransformer has missing template params when extending Symfony\Component\Form\DataTransformerInterface, expecting 2 (see https://psalm.dev/182)
|
MissingTemplateParam:
src/Form/DataTransformer/MoneyToArrayTransformer.php#L16
src/Form/DataTransformer/MoneyToArrayTransformer.php:16:42: MissingTemplateParam: Tbbc\MoneyBundle\Form\DataTransformer\MoneyToArrayTransformer has missing template params when extending Symfony\Component\Form\DataTransformerInterface, expecting 2 (see https://psalm.dev/182)
|
MissingParamType:
src/Form/DataTransformer/MoneyToArrayTransformer.php#L30
src/Form/DataTransformer/MoneyToArrayTransformer.php:30:31: MissingParamType: Parameter $value has no provided type (see https://psalm.dev/154)
|
ArgumentTypeCoercion:
src/Form/DataTransformer/MoneyToArrayTransformer.php#L73
src/Form/DataTransformer/MoneyToArrayTransformer.php:73:38: ArgumentTypeCoercion: Argument 1 of Money\Currency::__construct expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
MissingParamType:
src/Form/DataTransformer/SimpleMoneyToArrayTransformer.php#L24
src/Form/DataTransformer/SimpleMoneyToArrayTransformer.php:24:31: MissingParamType: Parameter $value has no provided type (see https://psalm.dev/154)
|
InvalidReturnStatement:
src/Form/DataTransformer/SimpleMoneyToArrayTransformer.php#L32
src/Form/DataTransformer/SimpleMoneyToArrayTransformer.php:32:16: InvalidReturnStatement: The inferred type 'array{tbbc_amount: string}' does not match the declared return type 'array{tbbc_amount: string, tbbc_currency: Money\Currency}|null' for Tbbc\MoneyBundle\Form\DataTransformer\SimpleMoneyToArrayTransformer::transform (see https://psalm.dev/128)
|
ArgumentTypeCoercion:
src/Money/MoneyManager.php#L27
src/Money/MoneyManager.php:27:34: ArgumentTypeCoercion: Argument 1 of Money\Currency::__construct expects non-empty-string, but parent type string provided (see https://psalm.dev/193)
|
RiskyTruthyFalsyComparison:
src/Pair/RatioProvider/ECBRatioProvider.php#L63
src/Pair/RatioProvider/ECBRatioProvider.php:63:13: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
|
TypeDoesNotContainNull:
src/Pair/RatioProvider/ExchangerAdapterRatioProvider.php#L55
src/Pair/RatioProvider/ExchangerAdapterRatioProvider.php:55:13: TypeDoesNotContainNull: string does not contain null (see https://psalm.dev/090)
|
TypeDoesNotContainNull:
src/Pair/RatioProvider/ExchangerAdapterRatioProvider.php#L55
src/Pair/RatioProvider/ExchangerAdapterRatioProvider.php:55:13: TypeDoesNotContainNull: Type string for $currencyCode is never null (see https://psalm.dev/090)
|
PHP 8.3 - 7.0.* - prefer-stable
Process completed with exit code 1.
|
PHP 8.1 - 6.4.* - prefer-stable
Process completed with exit code 1.
|
PHP 8.1 - 5.4.* - prefer-stable
Process completed with exit code 1.
|
PHP 8.2 - 7.0.* - prefer-stable
Process completed with exit code 1.
|
PHP 8.1 - 5.4.* - prefer-lowest
Process completed with exit code 1.
|