| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 40 | 1 | { |
|
| 41 | |||
| 42 | $from = $input->getArgument("from"); |
||
| 43 | 1 | if ($from != null) { |
|
| 44 | 1 | $this->from = \DateTime::createFromFormat("Y-m-d H:i:s", $from . "00:00:00"); |
|
| 45 | } |
||
| 46 | $this->postsApi->baseline($this); |
||
| 47 | 1 | if ($from != null) { |
|
| 48 | 1 | $output->writeln(sprintf("Successfully base-lined Posts from %s", $from)); |
|
| 49 | } else { |
||
| 50 | $output->writeln(sprintf("Successfully base-lined all Posts")); |
||
| 51 | 1 | } |
|
| 52 | |||
| 53 | return Command::SUCCESS; |
||
| 54 | 1 | ||
| 68 | } |