ControllerCollection   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getControllers() 0 3 1
A setControllers() 0 5 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * Copyright (c) 2017
4
 *
5
 * @package   Majima
6
 * @author    David Neustadt <[email protected]>
7
 * @copyright 2017 David Neustadt
8
 * @license   MIT
9
 */
10
11
namespace Majima\PluginBundle\Components;
12
13
/**
14
 * Class ControllerCollection
15
 * @package Majima\PluginBundle\Components
16
 */
17
class ControllerCollection
18
{
19
    /**
20
     * @var array
21
     */
22
    private $controllers = [];
23
24
    /**
25
     * ControllerCollection constructor.
26
     * @param array $controllers
27
     */
28
    public function __construct($controllers)
29
    {
30
        $this->controllers = $controllers;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    public function getControllers()
37
    {
38
        return $this->controllers;
39
    }
40
41
    /**
42
     * @param array $controllers
43
     */
44
    public function setControllers($controllers)
45
    {
46
        $this->controllers = array_merge(
47
            $this->getControllers(),
48
            $controllers
49
        );
50
    }
51
}