| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 62 | 81 | public function apply(RestRequestOptions $options, ReflectionMethodWrapper $reflectionMethod) |
|
| 63 | { |
||
| 64 | 81 | if (!$this->enabled) { |
|
| 65 | 81 | $options->disableBodyValidation(); |
|
| 66 | 81 | return; |
|
| 67 | } |
||
| 68 | |||
| 69 | 81 | $options->setBodyValidationOptions( |
|
| 70 | 81 | (new ValidationOptions()) |
|
| 71 | 81 | ->setValidationGroups($this->groups) |
|
| 72 | 81 | ->setViolationPathMap($this->violationPathMap) |
|
| 73 | ); |
||
| 74 | 81 | } |
|
| 75 | } |
||
| 76 |