| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace HSkrasek\OpenAPI\Command\Stages; |
||
| 29 | public function __invoke($payload) |
||
| 30 | { |
||
| 31 | $payload[0] = array_reduce($payload[0], function (array $carry, array $openApiSchemaFile) { |
||
| 32 | $carry['/' . $openApiSchemaFile['basename']] = $this->pipeline->process($openApiSchemaFile); |
||
| 33 | |||
| 34 | return $carry; |
||
| 35 | }, []); |
||
| 36 | |||
| 37 | $this->dereferencer->getLoaderManager()->registerLoader('file', new ArrayLoader($payload[0])); |
||
| 38 | |||
| 39 | $payload[0] = array_map(function ($schema) { |
||
| 40 | return $this->dereferencer->dereference($schema, 'file://'); |
||
| 41 | }, $payload[0]); |
||
| 42 | |||
| 43 | return $payload; |
||
| 44 | } |
||
| 45 | } |
||
| 46 |