for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mistletoe\Application\Commands;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Class RunDueCommand
* @package Mistletoe\Application\Commands
*/
class ListDueCommand extends AbstractCommand
{
protected function configure()
$this
->setName('list:due')
->setDescription('List all due tasks')
->addArgument('path', InputArgument::OPTIONAL, "Where is your Mistletoe Project File?");;
Let’s take a look at an example:
// Bad $a = 5; $b = 6; $c = 7; // Good $a = 5; $b = 6; $c = 7;
}
protected function execute(InputInterface $input, OutputInterface $output)
$planner = $this->getTaskPlanner($input->getArgument('path'));
$dueTasks = $planner->getDueTasks();
$planner->flagForTesting();
$commands = $planner->runDueTasks();
$this->listTasks($output, $dueTasks);
$output->writeln("\nAnd the commands run are: ");
/** @var array $commands */
foreach ($commands as $command) {
$output->writeln($command);
Let’s take a look at an example: