| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 30 | public function __construct(ResourceObject $resource, string $method) |
||
| 31 | { |
||
| 32 | // Trigger rendering to get view |
||
| 33 | $resourceString = (string) $resource; |
||
| 34 | unset($resourceString); |
||
| 35 | |||
| 36 | $this->uri = (string) $resource->uri; |
||
|
|
|||
| 37 | $this->method = strtoupper($method); |
||
| 38 | $this->code = $resource->code; |
||
| 39 | $this->headers = $resource->headers; |
||
| 40 | $this->body = $resource->body; |
||
| 41 | /** @psalm-suppress PossiblyNullPropertyAssignmentValue */ |
||
| 42 | $this->view = $resource->view ?? ''; |
||
| 43 | } |
||
| 45 |