Skip to content

Commit 55eb209

Browse files
author
Augustin Pasquini
committed
CI fixed
1 parent e17afd3 commit 55eb209

5 files changed

Lines changed: 54 additions & 29 deletions

File tree

phpstan-baseline.neon

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,6 @@ parameters:
465465
count: 1
466466
path: src/Validator/Constraints/Email.php
467467

468-
-
469-
message: "#^Public property `mode` not marked as readonly\\.$#"
470-
count: 1
471-
path: src/Validator/Constraints/Email.php
472-
473468
-
474469
message: "#^Public property `tldMessage` not marked as readonly\\.$#"
475470
count: 1
@@ -480,6 +475,11 @@ parameters:
480475
count: 1
481476
path: src/Validator/Constraints/EmployerIdentificationNumber.php
482477

478+
-
479+
message: "#^Return type \\(string\\) of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Entity\\:\\:getTargets\\(\\) should be covariant with return type \\('class'\\|'property'\\|array\\<'class'\\|'property'\\>\\) of method Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:getTargets\\(\\)$#"
480+
count: 1
481+
path: src/Validator/Constraints/Entity.php
482+
483483
-
484484
message: "#^Method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\EntityValidator\\:\\:getFieldAttributes\\(\\) has parameter \\$reflectionClass with generic class ReflectionClass but does not specify its types\\: T$#"
485485
count: 1
@@ -495,11 +495,6 @@ parameters:
495495
count: 1
496496
path: src/Validator/Constraints/EntityValidator.php
497497

498-
-
499-
message: "#^Class AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\FloatScale has an uninitialized property \\$scale\\. Give it default value or assign it in the constructor\\.$#"
500-
count: 1
501-
path: src/Validator/Constraints/FloatScale.php
502-
503498
-
504499
message: "#^Public property `message` not marked as readonly\\.$#"
505500
count: 1
@@ -530,6 +525,26 @@ parameters:
530525
count: 1
531526
path: src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php
532527

528+
-
529+
message: "#^Cannot assign float to \\$this\\-\\>max \\- floats are not allowed\\.$#"
530+
count: 1
531+
path: src/Validator/Constraints/Money.php
532+
533+
-
534+
message: "#^Cannot assign float to \\$this\\-\\>min \\- floats are not allowed\\.$#"
535+
count: 1
536+
path: src/Validator/Constraints/Money.php
537+
538+
-
539+
message: "#^Parameter \\#1 \\$min of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:__construct\\(\\) cannot have float\\|null as its type \\- floats are not allowed\\.$#"
540+
count: 1
541+
path: src/Validator/Constraints/Money.php
542+
543+
-
544+
message: "#^Parameter \\#2 \\$max of method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:__construct\\(\\) cannot have float\\|null as its type \\- floats are not allowed\\.$#"
545+
count: 1
546+
path: src/Validator/Constraints/Money.php
547+
533548
-
534549
message: "#^Property AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Money\\:\\:\\$max cannot have float as its type \\- floats are not allowed\\.$#"
535550
count: 1
@@ -585,21 +600,6 @@ parameters:
585600
count: 1
586601
path: src/Validator/Constraints/Phone.php
587602

588-
-
589-
message: "#^Public property `wrongTypeMessage` not marked as readonly\\.$#"
590-
count: 1
591-
path: src/Validator/Constraints/PhoneLandline.php
592-
593-
-
594-
message: "#^Public property `wrongTypeMessage` not marked as readonly\\.$#"
595-
count: 1
596-
path: src/Validator/Constraints/PhoneMobile.php
597-
598-
-
599-
message: "#^Class AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\Postal has an uninitialized property \\$countryPropertyPath\\. Give it default value or assign it in the constructor\\.$#"
600-
count: 1
601-
path: src/Validator/Constraints/Postal.php
602-
603603
-
604604
message: "#^Public property `countryPropertyPath` not marked as readonly\\.$#"
605605
count: 1
@@ -635,6 +635,11 @@ parameters:
635635
count: 1
636636
path: src/Validator/Constraints/UsSocialSecurityNumber.php
637637

638+
-
639+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
640+
count: 1
641+
path: src/Validator/ConstraintsSetProvider/Field/EmailProvider.php
642+
638643
-
639644
message: "#^Method AssoConnect\\\\ValidatorBundle\\\\Validator\\\\ConstraintsSetProvider\\\\Field\\\\IntegerProvider\\:\\:getMaxValue\\(\\) cannot have float\\|int as its return type \\- floats are not allowed\\.$#"
640645
count: 1
@@ -649,3 +654,18 @@ parameters:
649654
message: "#^Missing native return typehint float$#"
650655
count: 2
651656
path: src/Validator/ConstraintsSetProvider/Field/IntegerProvider.php
657+
658+
-
659+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
660+
count: 1
661+
path: src/Validator/ConstraintsSetProvider/Field/StringProvider.php
662+
663+
-
664+
message: "#^Parameter \\$max of class Symfony\\\\Component\\\\Validator\\\\Constraints\\\\Length constructor expects int\\<1, max\\>\\|null, int given\\.$#"
665+
count: 1
666+
path: src/Validator/ConstraintsSetProvider/Field/TextProvider.php
667+
668+
-
669+
message: "#^Parameter \\#1 \\$array1 of static method AssoConnect\\\\ValidatorBundle\\\\Test\\\\ConstraintValidatorTestCase\\<AssoConnect\\\\ValidatorBundle\\\\Validator\\\\Constraints\\\\EntityValidator\\>\\:\\:assertArrayContainsSameObjects\\(\\) expects array, array\\|Symfony\\\\Component\\\\Validator\\\\Constraint given\\.$#"
670+
count: 1
671+
path: tests/Validator/Constraints/EntityValidatorTest.php

src/Validator/Constraints/LastDigitsUsSocialSecurityNumber.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function __construct(
2323
) {
2424
parent::__construct(groups: $groups, payload: $payload);
2525

26-
$this->message = $message ?? 'The value {{ value }} is not a valid set of last four digits of a US Social Security Number.';
26+
$this->message = $message
27+
?? 'The value {{ value }} is not a valid set of last four digits of a US Social Security Number.';
2728
}
2829
}

src/Validator/Constraints/Phone.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,14 @@ public function __construct(
6363
parent::__construct(groups: $groups, payload: $payload);
6464

6565
$this->message = $message ?? 'The value {{ value }} is not a valid phone number.';
66-
$this->notIntlFormatMessage = $notIntlFormatMessage ?? 'The value {{ value }} is not formatted as an international phone number.';
66+
$this->notIntlFormatMessage = $notIntlFormatMessage
67+
?? 'The value {{ value }} is not formatted as an international phone number.';
6768
$this->tooShortMessage = $tooShortMessage ?? 'The phone number {{ value }} is too short.';
6869
$this->tooLongMessage = $tooLongMessage ?? 'The phone number {{ value }} is too long.';
6970
$this->inexistantMessage = $inexistantMessage ?? 'The phone number {{ value }} does not exist.';
7071
$this->wrongTypeMessage = $wrongTypeMessage ?? 'The value {{ value }} is not an accepted phone number type.';
71-
$this->invalidCountryCodeMessage = $invalidCountryCodeMessage ?? 'The phone number {{ value }} does not have a valid country code.';
72+
$this->invalidCountryCodeMessage = $invalidCountryCodeMessage
73+
?? 'The phone number {{ value }} does not have a valid country code.';
7274
}
7375

7476
/**

src/Validator/Constraints/Postal.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function __construct(
3636
$this->message = $message ?? 'The value {{ value }} is not a valid postal code.';
3737
$this->unknownCountryMessage = $unknownCountryMessage ?? 'The country {{ country }} is unknown.';
3838
$this->missingPostalCodeMessage = $missingPostalCodeMessage ?? 'The postal code must be provided.';
39-
$this->noPostalCodeMessage = $noPostalCodeMessage ?? 'There is no postal code system in the country {{ country }}.';
39+
$this->noPostalCodeMessage = $noPostalCodeMessage
40+
?? 'There is no postal code system in the country {{ country }}.';
4041
}
4142
}

tests/Validator/Constraints/PostalValidatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function createValidator(): ConstraintValidator
3131
public function testMissingPropertyPath(): void
3232
{
3333
$this->expectException(\ArgumentCountError::class);
34+
/** @phpstan-ignore-next-line */
3435
new Postal();
3536
}
3637

0 commit comments

Comments
 (0)