| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 24 | public function __construct(Document $document) |
||
| 25 | { |
||
| 26 | $this->document = $document; |
||
| 27 | $this->schemes = array_map('strtolower', isset($document->protocols) ? $document->protocols : []); |
||
| 28 | |||
| 29 | $document = clone $document; |
||
| 30 | |||
| 31 | $document->apply(function ($definition, $attributeName, $parent, $parentAttributeName) { |
||
| 32 | if (substr((string)$attributeName, 0, 1) === '/') { |
||
| 33 | $pathName = "{$parentAttributeName}{$attributeName}"; |
||
| 34 | $this->paths[$pathName] = new RamlPath($pathName, $definition); |
||
| 35 | } |
||
| 36 | }); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |