Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 3 | public function addEnvironment(Environment $environment) |
|
26 | { |
||
27 | 3 | if (isset($this->environments[(string)$environment])) { |
|
28 | 1 | throw new InvalidArgumentException(sprintf( |
|
29 | 1 | 'Environment: %s already exists', |
|
30 | $environment |
||
31 | 1 | )); |
|
32 | } |
||
33 | |||
34 | 3 | $this->environments[(string)$environment] = $environment; |
|
35 | |||
36 | 3 | return $this; |
|
37 | } |
||
38 | |||
76 |