Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
7 | class Asset |
||
8 | { |
||
9 | /** @var RendererInterface */ |
||
10 | private $renderer; |
||
11 | |||
12 | /** @var array */ |
||
13 | private $assets = []; |
||
14 | |||
15 | public function __construct(RendererInterface $renderer) |
||
16 | { |
||
17 | $this->renderer = $renderer; |
||
18 | } |
||
19 | |||
20 | public function add(string $asset): self |
||
27 | } |
||
28 | |||
29 | public function write(): string |
||
30 | { |
||
31 | return $this->renderer->render($this->assets); |
||
32 | } |
||
33 | |||
34 | public function __toString() |
||
35 | { |
||
36 | return $this->write(); |
||
37 | } |
||
38 | |||
39 | private function isExists(string $asset): bool |
||
42 | } |
||
43 | } |
||
44 |