mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: rector rules upt to PHP 74
This commit is contained in:
@@ -101,19 +101,13 @@ final class MembersEditorTest extends TestCase
|
||||
$editor = $factory->createEditor($household2 = new Household());
|
||||
$editor->addMovement(new DateTimeImmutable('yesterday'), $person, $positionNotSharing);
|
||||
|
||||
$sharings = $household->getCurrentMembers()->filter(static function (HouseholdMember $m) {
|
||||
return $m->getShareHousehold();
|
||||
});
|
||||
$notSharing = $household2->getCurrentMembers()->filter(static function (HouseholdMember $m) {
|
||||
return !$m->getShareHousehold();
|
||||
});
|
||||
$sharings = $household->getCurrentMembers()->filter(static fn(HouseholdMember $m) => $m->getShareHousehold());
|
||||
$notSharing = $household2->getCurrentMembers()->filter(static fn(HouseholdMember $m) => !$m->getShareHousehold());
|
||||
|
||||
$this->assertCount(1, $notSharing);
|
||||
$this->assertCount(1, $sharings);
|
||||
|
||||
$getPerson = static function (HouseholdMember $m) {
|
||||
return $m->getPerson();
|
||||
};
|
||||
$getPerson = static fn(HouseholdMember $m) => $m->getPerson();
|
||||
|
||||
$this->assertContains($person, $notSharing->map($getPerson));
|
||||
}
|
||||
@@ -143,19 +137,13 @@ final class MembersEditorTest extends TestCase
|
||||
$editor = $factory->createEditor($household);
|
||||
$editor->addMovement(new DateTimeImmutable('yesterday'), $person, $positionNotSharing);
|
||||
|
||||
$sharings = $household->getCurrentMembers()->filter(static function (HouseholdMember $m) {
|
||||
return $m->getShareHousehold();
|
||||
});
|
||||
$notSharing = $household->getCurrentMembers()->filter(static function (HouseholdMember $m) {
|
||||
return !$m->getShareHousehold();
|
||||
});
|
||||
$sharings = $household->getCurrentMembers()->filter(static fn(HouseholdMember $m) => $m->getShareHousehold());
|
||||
$notSharing = $household->getCurrentMembers()->filter(static fn(HouseholdMember $m) => !$m->getShareHousehold());
|
||||
|
||||
$this->assertCount(1, $notSharing);
|
||||
$this->assertCount(0, $sharings);
|
||||
|
||||
$getPerson = static function (HouseholdMember $m) {
|
||||
return $m->getPerson();
|
||||
};
|
||||
$getPerson = static fn(HouseholdMember $m) => $m->getPerson();
|
||||
|
||||
$this->assertContains($person, $notSharing->map($getPerson));
|
||||
}
|
||||
|
Reference in New Issue
Block a user