Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
27 | public function enhanceMethodDoc(MethodDocCreatedEvent $event) |
||
28 | { |
||
29 | $jsonRpcMethod = $event->getMethod(); |
||
30 | if ($jsonRpcMethod instanceof MethodWithValidatedParamsInterface) { |
||
31 | $paramsDoc = $this->paramDocConverter->transform($jsonRpcMethod->getParamsConstraint()); |
||
32 | |||
33 | // If method have arguments, they are required and not nullable |
||
34 | $paramsDoc->setNullable(false) |
||
35 | ->setRequired(true); |
||
36 | |||
37 | $event->getDoc()->setParamsDoc($paramsDoc); |
||
38 | } |
||
41 |