| Conditions | 3 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 26 | public function resolve($schemaAlias, $namespace = null) |
||
| 27 | { |
||
| 28 | try { |
||
| 29 | $criteria = []; |
||
| 30 | if (null !== $namespace) { |
||
| 31 | $criteria['category'] = $namespace; |
||
| 32 | } |
||
| 33 | |||
| 34 | return $this->settingsRepository->findBy($criteria); |
||
| 35 | } catch (NonUniqueResultException $e) { |
||
| 36 | $message = sprintf( |
||
| 37 | 'Multiple schemas found for "%s". You should probably define a custom settings resolver for this schema.', |
||
| 38 | $schemaAlias |
||
| 39 | ); |
||
| 40 | throw new \LogicException($message); |
||
| 41 | } |
||
| 44 |