Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
25 | public function __construct(string $path, \stdClass $definition) |
||
26 | { |
||
27 | $this->path = $path; |
||
28 | $definition = clone $definition; |
||
29 | if (isset($definition->parameters)) { |
||
30 | foreach ($definition->parameters as $parameterDefinition) { |
||
31 | $this->pathParameters[] = new OpenApiParameter($parameterDefinition); |
||
32 | } |
||
33 | unset($definition->parameters); |
||
34 | } |
||
35 | |||
36 | foreach ($definition as $method => $operationDefinition) { |
||
|
|||
37 | $method = strtolower($method); |
||
38 | $this->operations[$method] = $this->createOperation($method, $operationDefinition); |
||
39 | } |
||
40 | } |
||
41 | |||
58 |