Skip to content

Commit

Permalink
Fix PHPStan on PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed May 10, 2024
1 parent f3e562a commit fe236ee
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Constraints/CountryVatNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@

use Symfony\Component\Validator\Constraint;

/**
* @Annotation
*/
class CountryVatNumber extends Constraint
{
/** @var string */
public const CORRESPONDENCE_ERROR = '403';

Check failure on line 12 in src/Constraints/CountryVatNumber.php

View workflow job for this annotation

GitHub Actions / Static checks (PHP 8.3, Symfony ^5.4)

MissingClassConstType

src/Constraints/CountryVatNumber.php:12:18: MissingClassConstType: Class constant "FluxSE\SyliusEUVatPlugin\Constraints\CountryVatNumber::CORRESPONDENCE_ERROR" should have a declared type. (see https://psalm.dev/359)

Check failure on line 12 in src/Constraints/CountryVatNumber.php

View workflow job for this annotation

GitHub Actions / Static checks (PHP 8.3, Symfony ^6.4)

MissingClassConstType

src/Constraints/CountryVatNumber.php:12:18: MissingClassConstType: Class constant "FluxSE\SyliusEUVatPlugin\Constraints\CountryVatNumber::CORRESPONDENCE_ERROR" should have a declared type. (see https://psalm.dev/359)

/** @var string */
public $message = 'flux_se.sylius_eu_vat.country_vat_number.invalid';
public string $message = 'flux_se.sylius_eu_vat.country_vat_number.invalid';

/** @var string[] */
public $groups = [];

/** @var string */
public $vatNumberPath = 'vatNumber';
public string $vatNumberPath = 'vatNumber';

public function getTargets()
{
Expand Down

0 comments on commit fe236ee

Please sign in to comment.