ConsoleDependencyProvider::getCommandList()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Xervice\Console;
5
6
7
use Xervice\Console\Business\Model\Command\CommandCollection;
8
use Xervice\Core\Business\Model\Dependency\DependencyContainerInterface;
9
use Xervice\Core\Business\Model\Dependency\Provider\AbstractDependencyProvider;
10
11
class ConsoleDependencyProvider extends AbstractDependencyProvider
12
{
13
    public const COMMAND_COLLECTION = 'command.collection';
14
15
    /**
16
     * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container
17
     *
18
     * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
19
     */
20 1
    public function handleDependencies(DependencyContainerInterface $container): DependencyContainerInterface
21
    {
22
        $container[self::COMMAND_COLLECTION] = function () {
23 1
            return new CommandCollection(
24 1
                $this->getCommandList()
25
            );
26
        };
27
28 1
        return $container;
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    protected function getCommandList() : array
35
    {
36
        return [];
37
    }
38
}
39