| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function get(?string $name = NULL): ProfileInterface |
||
| 51 | { |
||
| 52 | if (NULL === $name) { |
||
| 53 | return $this->defaultProfile; |
||
| 54 | } |
||
| 55 | |||
| 56 | if (!isset($this->profiles[$name])) { |
||
| 57 | throw new InvalidArgumentException(sprintf( |
||
| 58 | 'Profile with name "%s" is not defined.', |
||
| 59 | $name |
||
| 60 | )); |
||
| 61 | } |
||
| 62 | |||
| 63 | return $this->profiles[$name]; |
||
| 64 | } |
||
| 82 |