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.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\DataFixtures\ORM;
@@ -8,7 +15,9 @@ use Chill\PersonBundle\Service\Import\SocialWorkMetadata;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Persistence\ObjectManager;
use Exception;
use League\Csv\Reader;
use Throwable;
class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
{
@@ -19,21 +28,21 @@ class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
$this->importer = $importer;
}
public function load(ObjectManager $manager)
{
try {
$csv = Reader::createFromPath(__DIR__.'/data/social_work_metadata.csv');
} catch (\Throwable $e) {
throw new \Exception('Error while loading CSV.',0, $e);
}
$csv->setDelimiter(";");
$this->importer->import($csv);
}
public function getOrder()
{
return 9500;
}
public function load(ObjectManager $manager)
{
try {
$csv = Reader::createFromPath(__DIR__ . '/data/social_work_metadata.csv');
} catch (Throwable $e) {
throw new Exception('Error while loading CSV.', 0, $e);
}
$csv->setDelimiter(';');
$this->importer->import($csv);
}
}