@@ -92,22 +92,22 @@ discard block |
||
| 92 | 92 | $xpath = new \DOMXpath($resources); |
| 93 | 93 | |
| 94 | 94 | $metadata = [ |
| 95 | - 'shortName' => $metadata->getAttribute('shortName') ?: null, |
|
| 96 | - 'description' => $metadata->getAttribute('description') ?: null, |
|
| 97 | - 'iri' => $metadata->getAttribute('iri') ?: null, |
|
| 98 | - 'itemOperations' => $this->getOperations($xpath->query('./itemOperations/operation', $metadata)) ?: null, |
|
| 99 | - 'collectionOperations' => $this->getOperations($xpath->query('./collectionOperations/operation', $metadata)) ?: null, |
|
| 100 | - 'attributes' => $this->getAttributes($xpath->query('./attributes/attribute', $metadata)), |
|
| 95 | + 'shortName' => $metadata->getAttribute('shortName') ?: null, |
|
| 96 | + 'description' => $metadata->getAttribute('description') ?: null, |
|
| 97 | + 'iri' => $metadata->getAttribute('iri') ?: null, |
|
| 98 | + 'itemOperations' => $this->getOperations($xpath->query('./itemOperations/operation', $metadata)) ?: null, |
|
| 99 | + 'collectionOperations' => $this->getOperations($xpath->query('./collectionOperations/operation', $metadata)) ?: null, |
|
| 100 | + 'attributes' => $this->getAttributes($xpath->query('./attributes/attribute', $metadata)), |
|
| 101 | 101 | ]; |
| 102 | 102 | |
| 103 | 103 | if (!$parentResourceMetadata) { |
| 104 | 104 | return new ResourceMetadata( |
| 105 | - $metadata['shortName'], |
|
| 106 | - $metadata['description'], |
|
| 107 | - $metadata['iri'], |
|
| 108 | - $metadata['itemOperations'], |
|
| 109 | - $metadata['collectionOperations'], |
|
| 110 | - $metadata['attributes'] |
|
| 105 | + $metadata['shortName'], |
|
| 106 | + $metadata['description'], |
|
| 107 | + $metadata['iri'], |
|
| 108 | + $metadata['itemOperations'], |
|
| 109 | + $metadata['collectionOperations'], |
|
| 110 | + $metadata['attributes'] |
|
| 111 | 111 | ); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | foreach ($query as $operation) { |
| 163 | 163 | $key = $operation->getAttribute('key'); |
| 164 | 164 | $operations[$key] = [ |
| 165 | - 'method' => $operation->getAttribute('method'), |
|
| 165 | + 'method' => $operation->getAttribute('method'), |
|
| 166 | 166 | ]; |
| 167 | 167 | |
| 168 | 168 | $path = $operation->getAttribute('path'); |