@@ -54,8 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | foreach ($input as $key => $value) { |
56 | 56 | $name = is_numeric($key) ? |
57 | - $this->singularizer->convert($element->getName()) : |
|
58 | - str_replace(['<', '>'], '', (string) $key); |
|
57 | + $this->singularizer->convert($element->getName()) : str_replace(['<', '>'], '', (string) $key); |
|
59 | 58 | if (is_array($value)) { |
60 | 59 | $node = $element->addChild($name); |
61 | 60 | $this->toSimpleXML($value, $node); |
@@ -14,13 +14,12 @@ |
||
14 | 14 | } |
15 | 15 | return [ |
16 | 16 | 'links' => array_map( |
17 | - static function (Link $link) use ($baseUri): array { |
|
17 | + static function(Link $link) use ($baseUri): array { |
|
18 | 18 | return [ |
19 | 19 | 'href' => $baseUri . $link->path(), |
20 | 20 | 'rel' => (string) $link->type(), |
21 | 21 | 'type' => $link->type()->isReadOperation() ? |
22 | - 'GET' : |
|
23 | - 'POST', |
|
22 | + 'GET' : 'POST', |
|
24 | 23 | ]; |
25 | 24 | }, |
26 | 25 | $resource->links()->items() |