Total Complexity | 5 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | class CasesCollection extends BaseCasesCollection implements Arrayable, Jsonable, JsonSerializable, Stringable |
||
25 | { |
||
26 | use Conditionable; |
||
27 | use Macroable; |
||
|
|||
28 | use Tappable; |
||
29 | |||
30 | /** |
||
31 | * Turn the collection into a string. |
||
32 | */ |
||
33 | 1 | public function __toString(): string |
|
34 | { |
||
35 | 1 | return $this->toJson(); |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * Turn the collection into a JSON. |
||
40 | * |
||
41 | * @param int $options |
||
42 | */ |
||
43 | 2 | public function toJson($options = 0): string|false |
|
44 | { |
||
45 | 2 | return json_encode($this->toArray(), $options); |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Turn the collection into a JSON serializable array. |
||
50 | * |
||
51 | * @return array<TKey, mixed> |
||
52 | */ |
||
53 | 1 | public function jsonSerialize(): array |
|
54 | { |
||
55 | 1 | return $this->toArray(); |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * Dump the cases and end the script. |
||
60 | * |
||
61 | * @codeCoverageIgnore |
||
62 | */ |
||
63 | public function dd(): never |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * Dump the cases. |
||
72 | */ |
||
73 | 1 | public function dump(): static |
|
78 | } |
||
79 | } |
||
80 |