Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class SimdjsonDecoder extends AbstractDecoder |
||
10 | { |
||
11 | /** |
||
12 | * Instantiate the class. |
||
13 | * |
||
14 | * @param bool $decodesToArray |
||
15 | * @param int $depth |
||
16 | */ |
||
17 | 376 | public function __construct(private readonly bool $decodesToArray = true, private readonly int $depth = 512) |
|
19 | 376 | } |
|
20 | |||
21 | /** |
||
22 | * Retrieve the decoded value of the given JSON |
||
23 | * |
||
24 | * @param string $json |
||
25 | * @return mixed |
||
26 | * @throws \Throwable |
||
27 | */ |
||
28 | 263 | protected function decodeJson(string $json): mixed |
|
33 |