mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-23 07:04:58 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -28,7 +28,7 @@ class LoadCalendarACL extends Fixture implements OrderedFixtureInterface
|
||||
foreach ([
|
||||
CalendarVoter::CREATE,
|
||||
CalendarVoter::DELETE,
|
||||
CalendarVoter::DELETE
|
||||
CalendarVoter::DELETE,
|
||||
] as $role) {
|
||||
$roleScopes[] = $r = (new RoleScope())
|
||||
->setRole($role);
|
||||
@@ -51,5 +51,4 @@ class LoadCalendarACL extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
return 16000;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@ use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\LocationType;
|
||||
use Chill\MainBundle\Entity\PostalCode;
|
||||
use Chill\MainBundle\Repository\UserRepository;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Bundle\FixturesBundle\FixtureGroupInterface;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
@@ -63,7 +62,7 @@ class LoadCalendarRange extends Fixture implements FixtureGroupInterface, Ordere
|
||||
$manager->persist($type);
|
||||
$manager->persist($location);
|
||||
|
||||
$now = new DateTimeImmutable();
|
||||
$now = new \DateTimeImmutable();
|
||||
|
||||
$days = [
|
||||
'2021-08-23',
|
||||
@@ -74,8 +73,8 @@ class LoadCalendarRange extends Fixture implements FixtureGroupInterface, Ordere
|
||||
'2021-08-31',
|
||||
'2021-09-01',
|
||||
'2021-09-02',
|
||||
(new DateTimeImmutable('tomorrow'))->format('Y-m-d'),
|
||||
(new DateTimeImmutable('today'))->format('Y-m-d'),
|
||||
(new \DateTimeImmutable('tomorrow'))->format('Y-m-d'),
|
||||
(new \DateTimeImmutable('today'))->format('Y-m-d'),
|
||||
$now->add(new \DateInterval('P7D'))->format('Y-m-d'),
|
||||
$now->add(new \DateInterval('P8D'))->format('Y-m-d'),
|
||||
$now->add(new \DateInterval('P9D'))->format('Y-m-d'),
|
||||
@@ -92,9 +91,9 @@ class LoadCalendarRange extends Fixture implements FixtureGroupInterface, Ordere
|
||||
foreach ($users as $u) {
|
||||
foreach ($days as $d) {
|
||||
foreach ($hours as $h) {
|
||||
$event = $d . ' ' . $h;
|
||||
$startEvent = new DateTimeImmutable($event);
|
||||
$endEvent = new DateTimeImmutable($event . ' + 1 hours');
|
||||
$event = $d.' '.$h;
|
||||
$startEvent = new \DateTimeImmutable($event);
|
||||
$endEvent = new \DateTimeImmutable($event.' + 1 hours');
|
||||
$calendarRange = (new CalendarRange())
|
||||
->setUser($u)
|
||||
->setStartDate($startEvent)
|
||||
|
@@ -39,12 +39,12 @@ class LoadCancelReason extends Fixture implements FixtureGroupInterface
|
||||
];
|
||||
|
||||
foreach ($arr as $a) {
|
||||
echo 'Creating calendar cancel reason : ' . $a['name'] . "\n";
|
||||
echo 'Creating calendar cancel reason : '.$a['name']."\n";
|
||||
$cancelReason = (new CancelReason())
|
||||
->setCanceledBy($a['name'])
|
||||
->setActive(true);
|
||||
$manager->persist($cancelReason);
|
||||
$reference = 'CancelReason_' . $a['name'];
|
||||
$reference = 'CancelReason_'.$a['name'];
|
||||
$this->addReference($reference, $cancelReason);
|
||||
static::$references[] = $reference;
|
||||
}
|
||||
|
@@ -46,12 +46,12 @@ class LoadInvite extends Fixture implements FixtureGroupInterface
|
||||
];
|
||||
|
||||
foreach ($arr as $a) {
|
||||
echo 'Creating calendar invite : ' . $a['name']['fr'] . "\n";
|
||||
echo 'Creating calendar invite : '.$a['name']['fr']."\n";
|
||||
$invite = (new Invite())
|
||||
->setStatus($a['status'])
|
||||
->setUser($this->getRandomUser());
|
||||
$manager->persist($invite);
|
||||
$reference = 'Invite_' . $a['name']['fr'];
|
||||
$reference = 'Invite_'.$a['name']['fr'];
|
||||
$this->addReference($reference, $invite);
|
||||
static::$references[] = $reference;
|
||||
}
|
||||
|
Reference in New Issue
Block a user