Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Find any untagged items needing review, use an arbitrarily early date.
     $review = $this->reviewer->getSummary(static::ALL, FALSE, $input->getOption('exact'));
     $table = new Table($output);
     $table->setHeaders(Reviewer::headers($input->getOption('exact')));
     $table->setRows($review);
     $table->render();
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     // Find any untagged items needing review, use an arbitrarily early date.
     $review = $this->reviewer->getSummary(static::ALL, TRUE);
     if (count($review) > 2) {
         // Incomplete records exist.
         $output->writeln('<error>Please tag/comment on the following entries:</error>');
         $table = new Table($output);
         $table->setHeaders(Reviewer::headers());
         $table->setRows($review);
         $table->render();
         return;
     }
     $entry_ids = $return = [];
     foreach ($this->repository->send() as $entry) {
         $entry_ids[$entry->tid] = $this->connector->sendEntry($entry);
         if ($entry_ids[$entry->tid]) {
             // A real entry, give some output.
             $output->writeln(sprintf('Stored entry for <info>%d</info>, remote id <comment>%d</comment>', $entry->tid, $entry_ids[$entry->tid]));
         }
     }
     $this->repository->store($entry_ids);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $review = $this->reviewer->getSummary(static::ALL);
     $total = end($review);
     $output->writeln(sprintf('<comment>Total:</comment> %s', $total[2]));
 }