| @@ 29-34 (lines=6) @@ | ||
| 26 | ||
| 27 | if (is_array($propertyValue)) { |
|
| 28 | foreach ($propertyValue as $value) { |
|
| 29 | if ($resource->get($propertyName) === $value && $resource->hasNotProperty($key)) { |
|
| 30 | throw new RuntimeException( |
|
| 31 | 'When property `' . $key . '` has value ' |
|
| 32 | . '`' . $value . '` also `' . $key . '` is mandatory' |
|
| 33 | ); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | } else { |
|
| 37 | if ($resource->get($propertyName) === $propertyValue && $resource->hasNotProperty($key)) { |
|
| @@ 36-43 (lines=8) @@ | ||
| 33 | ); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | } else { |
|
| 37 | if ($resource->get($propertyName) === $propertyValue && $resource->hasNotProperty($key)) { |
|
| 38 | throw new RuntimeException( |
|
| 39 | 'When property `' . $key . '` has value ' |
|
| 40 | . '`' . $propertyValue . '` also `' . $key . '` is mandatory' |
|
| 41 | ); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | } |
|
| 45 | } |
|
| 46 | } |
|