mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -11,17 +11,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Command;
|
||||
|
||||
use Chill\PersonBundle\Service\Import\ChillImporter;
|
||||
use Chill\PersonBundle\Service\Import\SocialWorkMetadataInterface;
|
||||
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
|
||||
{
|
||||
@@ -36,10 +32,10 @@ final class ImportSocialWorkMetadata extends Command
|
||||
protected function configure()
|
||||
{
|
||||
$description = 'Imports a structured table containing social issues, social actions, objectives, results and evaluations.';
|
||||
$help = 'File to csv format, no headers, semi-colon as delimiter, datas sorted by alphabetical order, column after column.'. PHP_EOL
|
||||
. 'Columns are: social issues parent, social issues child, social actions parent, social actions child, goals, results, evaluations.'. PHP_EOL
|
||||
. PHP_EOL
|
||||
. 'See social_work_metadata.csv as example.'. PHP_EOL;
|
||||
$help = 'File to csv format, no headers, semi-colon as delimiter, datas sorted by alphabetical order, column after column.'.PHP_EOL
|
||||
.'Columns are: social issues parent, social issues child, social actions parent, social actions child, goals, results, evaluations.'.PHP_EOL
|
||||
.PHP_EOL
|
||||
.'See social_work_metadata.csv as example.'.PHP_EOL;
|
||||
|
||||
$this
|
||||
->setName('chill:person:import-socialwork')
|
||||
@@ -55,8 +51,8 @@ final class ImportSocialWorkMetadata extends Command
|
||||
|
||||
try {
|
||||
$csv = Reader::createFromPath($filepath);
|
||||
} catch (Throwable $e) {
|
||||
throw new Exception('Error while loading CSV.', 0, $e);
|
||||
} catch (\Throwable $e) {
|
||||
throw new \Exception('Error while loading CSV.', 0, $e);
|
||||
}
|
||||
|
||||
$csv->setDelimiter(';');
|
||||
|
Reference in New Issue
Block a user