| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 88.89% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class EntrypointsCollection implements ContainerInterface |
||
| 13 | { |
||
| 14 | protected $entries = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * EntrypointsCollection constructor. |
||
| 18 | * @param array $entries |
||
| 19 | */ |
||
| 20 | 7 | public function __construct($entries = null) |
|
| 21 | { |
||
| 22 | 7 | $this->entries = $entries; |
|
| 23 | 7 | } |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritDoc |
||
| 27 | * @return EntrypointLookupInterface |
||
| 28 | */ |
||
| 29 | 5 | public function get($id) |
|
| 30 | { |
||
| 31 | 5 | if (!$this->has($id)) { |
|
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 35 | 5 | return $this->entries[$id]; |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritDoc |
||
| 40 | */ |
||
| 41 | 5 | public function has($id) |
|
| 44 | } |
||
| 45 | } |
||
| 46 |