Completed
Push — master ( ecaef0...28b78e )
by Peter
10:06
created

DependencyManagers::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types=1);
2
3
/**
4
 * This file is part of Packy.
5
 *
6
 * (c) Peter Nijssen
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AppBundle\DependencyManager;
13
14
class DependencyManagers
15
{
16
    /**
17
     * @var array
18
     */
19
    private $dependencyManagers;
20
21
    /**
22
     * DependencyManagers constructor.
23
     */
24
    public function __construct()
25
    {
26
        $this->dependencyManagers = [];
27
    }
28
29
    /**
30
     * @param DependencyManager $manager
31
     * @param string            $alias
32
     */
33
    public function add(DependencyManager $manager, string $alias)
34
    {
35
        $this->dependencyManagers[$alias] = $manager;
36
    }
37
38
    /**
39
     * @return DependencyManager[]
40
     */
41
    public function getAll(): array
42
    {
43
        return $this->dependencyManagers;
44
    }
45
}
46