import hiltes
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
mmoeller
2023-01-30 15:36:20 +01:00
parent d420c00036
commit 3493e038e3
31 changed files with 27498 additions and 20940 deletions

View File

@@ -3,6 +3,8 @@
namespace App\Command;
use App\Helper\HiltesImport;
use App\Repository\StockRepository;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
@@ -19,6 +21,14 @@ use Symfony\Component\Finder\Finder;
)]
class HiltesImportCommand extends Command
{
private $stockRepository;
private $logger;
public function __construct(StockRepository $stockRepository, LoggerInterface $logger)
{
$this->stockRepository = $stockRepository;
$this->logger = $logger;
parent::__construct();
}
protected function configure(): void
{
$this
@@ -38,12 +48,12 @@ class HiltesImportCommand extends Command
/**
* @var HiltesImport
*/
$hiltesImport = new HiltesImport();
$hiltesImport = new HiltesImport($this->stockRepository,$this->logger);
$hiltesImport->startImport();
$io->success('You have a new command! Now make it your own! Pass --help to see your options.');
$io->success('Done.');
return Command::SUCCESS;
}