| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | if (!$resourceClass) { |
||
| 39 | throw new RuntimeException('The request attribute "_resource_class" must be defined.'); |
||
| 40 | } |
||
| 41 | |||
| 42 | $collectionOperation = $request->attributes->get('_collection_operation_name'); |
||
| 43 | $itemOperation = $request->attributes->get('_item_operation_name'); |
||
| 44 | |||
| 45 | if (!$itemOperation && !$collectionOperation) { |
||
| 46 | throw new RuntimeException('One of the request attribute "_item_operation_name" or "_collection_operation_name" must be defined.'); |
||
| 47 | } |
||
| 57 |