DX: repairs code style, and psalm types

This commit is contained in:
Julien Fastré 2022-10-31 18:22:01 +01:00
parent 75f69859e6
commit fc9689e881
4 changed files with 3 additions and 28 deletions

View File

@ -10,16 +10,6 @@ parameters:
count: 1 count: 1
path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php path: src/Bundle/ChillActivityBundle/Entity/ActivityReasonCategory.php
-
message: "#^Method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:getDescription\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
-
message: "#^Method Chill\\\\ActivityBundle\\\\Export\\\\Export\\\\StatActivityDuration\\:\\:getTitle\\(\\) should return string but return statement is missing\\.$#"
count: 1
path: src/Bundle/ChillActivityBundle/Export/Export/StatActivityDuration.php
- -
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1 count: 1
@ -330,16 +320,6 @@ parameters:
count: 6 count: 6
path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php path: src/Bundle/ChillPersonBundle/Command/ImportPeopleFromCSVCommand.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/CountryOfBirthAggregator.php
-
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1
path: src/Bundle/ChillPersonBundle/Export/Aggregator/NationalityAggregator.php
- -
message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#"
count: 1 count: 1

View File

@ -58,7 +58,7 @@ class ExportAddressHelper
'country' => ['country'], 'country' => ['country'],
'postal_code' => ['postcode_code', 'postcode_name'], 'postal_code' => ['postcode_code', 'postcode_name'],
'street' => ['street', 'streetNumber'], 'street' => ['street', 'streetNumber'],
'building' => ['buildingName', 'corridor', 'distribution', 'extra', 'flat', 'floor'], 'building' => ['buildingName', 'corridor', 'distribution', 'extra', 'flat', 'floor', 'steps'],
'string' => ['_as_string'], 'string' => ['_as_string'],
'attributes' => ['isNoAddress', 'confidential', 'id'], 'attributes' => ['isNoAddress', 'confidential', 'id'],
'geom' => ['_lat', '_lon'], 'geom' => ['_lat', '_lon'],
@ -97,7 +97,6 @@ class ExportAddressHelper
case 'street': case 'street':
case 'streetNumber': case 'streetNumber':
case 'building':
case 'floor': case 'floor':
case 'corridor': case 'corridor':
case 'steps': case 'steps':
@ -238,10 +237,6 @@ class ExportAddressHelper
return $translationPrefix . $sanitizedKey; return $translationPrefix . $sanitizedKey;
} }
if (null === $value) {
return '';
}
switch ($value) { switch ($value) {
case null: case null:
return ''; return '';

View File

@ -187,7 +187,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
} }
/** /**
* param array{fields: string[], address_date: DateTimeImmutable} $data * param array{fields: string[], address_date: DateTimeImmutable} $data.
*/ */
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{ {

View File

@ -155,7 +155,7 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac
} }
/** /**
* param array{fields: string[], address_date: DateTimeImmutable} $data * param array{fields: string[], address_date: DateTimeImmutable} $data.
*/ */
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
{ {