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,4 +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.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\DataFixtures\ORM;
@@ -10,8 +18,9 @@ use Doctrine\Persistence\ObjectManager;
class LoadRelations extends Fixture implements FixtureGroupInterface
{
public const RELATION_KEY = 'relations';
public const RELATIONS = [
public const RELATION_KEY = 'relations';
public const RELATIONS = [
['title' => ['fr' => 'Mère'], 'reverseTitle' => ['fr' => 'Fille']],
['title' => ['fr' => 'Mère'], 'reverseTitle' => ['fr' => 'Fils']],
['title' => ['fr' => 'Père'], 'reverseTitle' => ['fr' => 'Fille']],
@@ -38,17 +47,16 @@ class LoadRelations extends Fixture implements FixtureGroupInterface
public function load(ObjectManager $manager)
{
foreach (self::RELATIONS as $key => $value){
print "Creating a new relation type: relation" . $value['title']['fr'] . "reverse relation: " . $value['reverseTitle']['fr'] . "\n";
foreach (self::RELATIONS as $key => $value) {
echo 'Creating a new relation type: relation' . $value['title']['fr'] . 'reverse relation: ' . $value['reverseTitle']['fr'] . "\n";
$relation = new Relation();
$relation->setTitle($value['title'])
->setReverseTitle($value['reverseTitle']);
$manager->persist($relation);
$this->addReference(self::RELATION_KEY.$key, $relation);
$this->addReference(self::RELATION_KEY . $key, $relation);
}
$manager->flush();
}
}