Completed
Pull Request — master (#39)
by Daniel
04:05
created

ConsoleFactory::getCommandList()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Jellyfish\Console;
4
5
use ArrayObject;
6
7
class ConsoleFactory
8
{
9
    /**
10
     * @var \ArrayObject
11
     */
12
    protected $commandList;
13
14
    /**
15
     * @return \ArrayObject
16
     */
17
    public function getCommandList(): ArrayObject {
18
        if ($this->commandList === null) {
19
            $this->commandList = new ArrayObject();
20
        }
21
22
        return $this->commandList;
23
    }
24
}
25