cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,5 +1,12 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\DataFixtures\ORM;
use Chill\PersonBundle\Entity\Household\Position;
@@ -8,26 +15,27 @@ use Doctrine\Persistence\ObjectManager;
class LoadHouseholdPosition extends Fixture
{
const POSITIONS_DATA = [
["Adulte", true, true, 1.0, self::ADULT ],
["Enfant", true, false, 2.0, self::CHILD ],
["Enfant hors ménage", false, false, 3.0, self::CHILD_OUT ]
];
public const ADULT = 'position_adulte';
const ADULT = "position_adulte";
const CHILD = "position_enfant";
const CHILD_OUT = "position_enfant_hors";
public const CHILD = 'position_enfant';
public const CHILD_OUT = 'position_enfant_hors';
public const POSITIONS_DATA = [
['Adulte', true, true, 1.0, self::ADULT],
['Enfant', true, false, 2.0, self::CHILD],
['Enfant hors ménage', false, false, 3.0, self::CHILD_OUT],
];
public function load(ObjectManager $manager)
{
foreach (self::POSITIONS_DATA as list($name, $share, $allowHolder,
$ordering, $ref)) {
foreach (self::POSITIONS_DATA as [$name, $share, $allowHolder,
$ordering, $ref]) {
$position = (new Position())
->setLabel([ "fr" => $name ])
->setLabel(['fr' => $name])
->setAllowHolder($allowHolder)
->setShareHousehold($share)
->setOrdering($ordering)
;
->setOrdering($ordering);
$manager->persist($position);
$this->addReference($ref, $position);