| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 1 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
| 14 | { |
||
| 15 | 1 | $container = $this->container($container); |
|
| 16 | |||
| 17 | 1 | $useContext = isset($options['use_context']) ? (boolean) $options['use_context'] : false; |
|
| 18 | |||
| 19 | 1 | $validator = new UniqueObject($this->merge($options, [ |
|
| 20 | 1 | 'object_manager' => $this->getObjectManager($container, $options), |
|
| 21 | 1 | 'use_context' => $useContext, |
|
| 22 | 1 | 'object_repository' => $this->getRepository($container, $options), |
|
| 23 | 1 | 'fields' => $this->getFields($options), |
|
| 24 | ])); |
||
| 25 | |||
| 26 | 1 | return $validator; |
|
| 27 | } |
||
| 28 | } |
||
| 29 |