Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 88.89% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | final class AssetJsonExporter implements AssetExporterInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var string The full path to the target JSON file. |
||
24 | */ |
||
25 | private string $targetFile; |
||
26 | |||
27 | /** |
||
28 | * @param string $targetFile The full path to the target JSON file. |
||
29 | */ |
||
30 | 5 | public function __construct(string $targetFile) |
|
31 | { |
||
32 | 5 | $this->targetFile = $targetFile; |
|
33 | 5 | } |
|
34 | |||
35 | /** |
||
36 | * {@inheritDoc} |
||
37 | * |
||
38 | * @throws JsonException If an error occurred during JSON encoding of asset bundles. |
||
39 | * @throws RuntimeException If an error occurred while writing to the JSON file. |
||
40 | */ |
||
41 | 4 | public function export(array $assetBundles): void |
|
51 | } |
||
52 | 3 | } |
|
54 |