| Conditions | 6 |
| Paths | 6 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public function __construct(array $resources) |
||
| 12 | { |
||
| 13 | if (!isset($resources['resources'])) { |
||
| 14 | throw new RuntimeException( |
||
| 15 | '' |
||
| 16 | ); |
||
| 17 | } |
||
| 18 | |||
| 19 | foreach ($resources['resources'] as $item) { |
||
| 20 | if (isset($item['constraints'])) { |
||
| 21 | foreach ($item['constraints'] as $name => $value) { |
||
| 22 | if (!in_array($name, [])) { |
||
| 23 | throw new RuntimeException( |
||
| 24 | 'Invalid constraint' |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | $this->resources = $resources; |
||
| 32 | } |
||
| 33 | |||
| 41 |