ListAllCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 4
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
A execute() 0 6 1
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