Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
11 | public static function because(RestResource $resource, Throwable $reason): self |
||
12 | { |
||
13 | return new self(sprintf( |
||
14 | 'Could not format the resource `%s` as xml, because: %s', |
||
15 | $resource->name(), |
||
16 | $reason->getMessage() |
||
17 | ), (int) $reason->getCode(), $reason); |
||
18 | } |
||
20 |