| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class RunFeedReaderCommand extends Command |
||
| 12 | { |
||
| 13 | public const NAME = 'feed:feed-reader:run'; |
||
| 14 | public const DESCRIPTION = 'Run feed reader.'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \Jellyfish\Feed\FeedReaderManagerInterface |
||
| 18 | */ |
||
| 19 | protected $feedReaderManager; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param \Jellyfish\Feed\FeedReaderManagerInterface $feedReaderManager |
||
| 23 | */ |
||
| 24 | public function __construct(FeedReaderManagerInterface $feedReaderManager) |
||
| 25 | { |
||
| 26 | parent::__construct(null); |
||
| 27 | |||
| 28 | $this->feedReaderManager = $feedReaderManager; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | protected function configure(): void |
||
| 35 | { |
||
| 36 | parent::configure(); |
||
| 37 | |||
| 38 | $this->setName(static::NAME); |
||
| 39 | $this->setDescription(static::DESCRIPTION); |
||
| 40 | $this->addArgument('identifier', InputArgument::REQUIRED, 'Feed reader identifier.'); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
| 45 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
| 46 | * |
||
| 47 | * @return int|null |
||
| 48 | */ |
||
| 49 | protected function execute(InputInterface $input, OutputInterface $output): ?int |
||
| 56 | } |
||
| 57 | } |
||
| 58 |