CommandCollection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 29
ccs 0
cts 6
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getCommands() 0 3 1
A addCommand() 0 3 1
1
<?php
2
3
namespace Deployee\Components\Application;
4
5
6
class CommandCollection
7
{
8
    /**
9
     * @var array
10
     */
11
    private $commands;
12
13
    /**
14
     * CommandCollection constructor.
15
     */
16
    public function __construct()
17
    {
18
        $this->commands = [];
19
    }
20
21
    /**
22
     * @param \Symfony\Component\Console\Command\Command $command
23
     */
24
    public function addCommand(\Symfony\Component\Console\Command\Command $command)
25
    {
26
        $this->commands[] = $command;
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function getCommands(): array
33
    {
34
        return $this->commands;
35
    }
36
}