| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 20 | 3 | public function __invoke(FormElementManager $formElementManager) |
|
| 21 | { |
||
| 22 | 3 | $serviceManager = $formElementManager->getServiceLocator(); |
|
| 23 | 3 | $config = $serviceManager->get('Config'); |
|
| 24 | |||
| 25 | 3 | if (!isset($config['money']['currencies'])) { |
|
| 26 | 1 | throw new InvalidArgumentException('Couldn\'t find currencies configuration.'); |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | $select = new CurrencySelect(); |
|
| 30 | 2 | $select->setValueOptions($config['money']['currencies']); |
|
| 31 | |||
| 32 | 2 | return $select; |
|
| 33 | } |
||
| 34 | } |
||
| 35 |