mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -329,7 +329,7 @@ class AccompanyingCourseApiControllerTest extends WebTestCase
|
||||
|
||||
// check that the person id is contained
|
||||
$participationsPersonsIds = array_map(
|
||||
function ($participation) { return $participation->person->id; },
|
||||
static function ($participation) { return $participation->person->id; },
|
||||
$data->participations
|
||||
);
|
||||
|
||||
|
@@ -151,7 +151,7 @@ class HouseholdApiControllerTest extends WebTestCase
|
||||
$this->assertArrayHasKey('count', $data);
|
||||
$this->assertArrayHasKey('results', $data);
|
||||
|
||||
$householdIds = array_map(function ($r) {
|
||||
$householdIds = array_map(static function ($r) {
|
||||
return $r['id'];
|
||||
}, $data['results']);
|
||||
|
||||
|
@@ -290,22 +290,22 @@ class PersonControllerUpdateTest extends WebTestCase
|
||||
public function validTextFieldsProvider()
|
||||
{
|
||||
return [
|
||||
['firstName', 'random Value', function (Person $person) { return $person->getFirstName(); }],
|
||||
['lastName', 'random Value', function (Person $person) { return $person->getLastName(); }],
|
||||
['firstName', 'random Value', static function (Person $person) { return $person->getFirstName(); }],
|
||||
['lastName', 'random Value', static function (Person $person) { return $person->getLastName(); }],
|
||||
// reminder: this value is capitalized
|
||||
['placeOfBirth', 'A PLACE', function (Person $person) { return $person->getPlaceOfBirth(); }],
|
||||
['birthdate', '1980-12-15', function (Person $person) { return $person->getBirthdate()->format('Y-m-d'); }],
|
||||
['phonenumber', '+32123456789', function (Person $person) { return $person->getPhonenumber(); }],
|
||||
['memo', 'jfkdlmq jkfldmsq jkmfdsq', function (Person $person) { return $person->getMemo(); }],
|
||||
['countryOfBirth', 'BE', function (Person $person) { return $person->getCountryOfBirth()->getCountryCode(); }],
|
||||
['nationality', 'FR', function (Person $person) { return $person->getNationality()->getCountryCode(); }],
|
||||
['placeOfBirth', '', function (Person $person) { return $person->getPlaceOfBirth(); }],
|
||||
['birthdate', '', function (Person $person) { return $person->getBirthdate(); }],
|
||||
['phonenumber', '', function (Person $person) { return $person->getPhonenumber(); }],
|
||||
['memo', '', function (Person $person) { return $person->getMemo(); }],
|
||||
['countryOfBirth', null, function (Person $person) { return $person->getCountryOfBirth(); }],
|
||||
['nationality', null, function (Person $person) { return $person->getNationality(); }],
|
||||
['gender', Person::FEMALE_GENDER, function (Person $person) { return $person->getGender(); }],
|
||||
['placeOfBirth', 'A PLACE', static function (Person $person) { return $person->getPlaceOfBirth(); }],
|
||||
['birthdate', '1980-12-15', static function (Person $person) { return $person->getBirthdate()->format('Y-m-d'); }],
|
||||
['phonenumber', '+32123456789', static function (Person $person) { return $person->getPhonenumber(); }],
|
||||
['memo', 'jfkdlmq jkfldmsq jkmfdsq', static function (Person $person) { return $person->getMemo(); }],
|
||||
['countryOfBirth', 'BE', static function (Person $person) { return $person->getCountryOfBirth()->getCountryCode(); }],
|
||||
['nationality', 'FR', static function (Person $person) { return $person->getNationality()->getCountryCode(); }],
|
||||
['placeOfBirth', '', static function (Person $person) { return $person->getPlaceOfBirth(); }],
|
||||
['birthdate', '', static function (Person $person) { return $person->getBirthdate(); }],
|
||||
['phonenumber', '', static function (Person $person) { return $person->getPhonenumber(); }],
|
||||
['memo', '', static function (Person $person) { return $person->getMemo(); }],
|
||||
['countryOfBirth', null, static function (Person $person) { return $person->getCountryOfBirth(); }],
|
||||
['nationality', null, static function (Person $person) { return $person->getNationality(); }],
|
||||
['gender', Person::FEMALE_GENDER, static function (Person $person) { return $person->getGender(); }],
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -195,12 +195,12 @@ class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase
|
||||
public function validTextFieldsProvider()
|
||||
{
|
||||
return [
|
||||
['firstName', 'random Value', function (Person $person) { return $person->getFirstName(); }],
|
||||
['lastName', 'random Value', function (Person $person) { return $person->getLastName(); }],
|
||||
['birthdate', '15-12-1980', function (Person $person) { return $person->getBirthdate()->format('d-m-Y'); }],
|
||||
['memo', 'jfkdlmq jkfldmsq jkmfdsq', function (Person $person) { return $person->getMemo(); }],
|
||||
['birthdate', '', function (Person $person) { return $person->getBirthdate(); }],
|
||||
['gender', Person::FEMALE_GENDER, function (Person $person) { return $person->getGender(); }],
|
||||
['firstName', 'random Value', static function (Person $person) { return $person->getFirstName(); }],
|
||||
['lastName', 'random Value', static function (Person $person) { return $person->getLastName(); }],
|
||||
['birthdate', '15-12-1980', static function (Person $person) { return $person->getBirthdate()->format('d-m-Y'); }],
|
||||
['memo', 'jfkdlmq jkfldmsq jkmfdsq', static function (Person $person) { return $person->getMemo(); }],
|
||||
['birthdate', '', static function (Person $person) { return $person->getBirthdate(); }],
|
||||
['gender', Person::FEMALE_GENDER, static function (Person $person) { return $person->getGender(); }],
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user