Collection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 4 1
A all() 0 4 1
1
<?php
2
3
namespace Buttress\Concrete\Console\Command\Collection;
4
5
use Buttress\Concrete\Console\Command\Command;
6
7
class Collection
8
{
9
10
    protected $commands = [];
11
12
    /**
13
     * Add a command to the stack
14
     * @param Command $command
15
     */
16 3
    public function add(Command $command)
17
    {
18 3
        $this->commands[] = $command;
19 3
    }
20
21
    /**
22
     * Get all commands that exist
23
     * @return Command[]
24
     */
25 3
    public function all()
26
    {
27 3
        return $this->commands;
28
    }
29
}
30