| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class HalResponse |
||
| 6 | { |
||
| 7 | private $json; |
||
| 8 | |||
| 9 | 2 | private function __construct(array $json) |
|
| 12 | 2 | } |
|
| 13 | |||
| 14 | 1 | public static function fromJson(string $json) |
|
| 15 | { |
||
| 16 | 1 | return self::fromArray(json_decode($json, true)); |
|
| 17 | } |
||
| 18 | |||
| 19 | 2 | public static function fromArray(array $json) |
|
| 20 | { |
||
| 21 | 2 | return new self($json); |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | public function total() |
|
| 27 | } |
||
| 28 | } |
||
| 29 |