mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,26 +1,30 @@
|
||||
<?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\Command;
|
||||
|
||||
use Chill\PersonBundle\Service\Import\ChillImporter;
|
||||
use Chill\PersonBundle\Service\Import\SocialWorkMetadataInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use League\Csv\Reader;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Throwable;
|
||||
|
||||
final class ImportSocialWorkMetadata extends Command
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
protected EntityManagerInterface $em;
|
||||
|
||||
/**
|
||||
@@ -51,13 +55,13 @@ final class ImportSocialWorkMetadata extends Command
|
||||
try {
|
||||
$csv = Reader::createFromPath($filepath);
|
||||
} catch (Throwable $e) {
|
||||
throw new Exception('Error while loading CSV.',0, $e);
|
||||
throw new Exception('Error while loading CSV.', 0, $e);
|
||||
}
|
||||
|
||||
$csv->setDelimiter(';');
|
||||
|
||||
return true === $this->importer->import($csv) ?
|
||||
0:
|
||||
0 :
|
||||
1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user