ListAllCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 2
1
<?php
2
namespace Mistletoe\Application\Commands;
3
4
use Symfony\Component\Console\Input\InputArgument;
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
/**
9
 * Class RunDueCommand
10
 * @package Mistletoe\Application\Commands
11
 */
12
class ListAllCommand extends AbstractCommand
13
{
14
    protected function configure()
15
    {
16
        $this
17
            ->setName('list:all')
18
            ->setDescription('List all registered tasks')
19
            ->addArgument('path', InputArgument::OPTIONAL, "Where is your Mistletoe Project File?");;
0 ignored issues
show
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
20
    }
21
22
    protected function execute(InputInterface $input, OutputInterface $output)
23
    {
24
        $planner = $this->getTaskPlanner($input->getArgument('path'));
25
        $tasks = $planner->getTasks();
26
        $this->listTasks($output, $tasks);
27
    }
28
}
29