Total Complexity | 3 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | abstract class StrategyAbstract implements StrategyInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var Asset[] |
||
13 | */ |
||
14 | protected array $assets; |
||
15 | |||
16 | protected string $hashId; |
||
17 | |||
18 | /** |
||
19 | * @var string css or js |
||
20 | */ |
||
21 | protected string $type; |
||
22 | |||
23 | /** |
||
24 | * @var Environment |
||
25 | */ |
||
26 | protected Environment $environment; |
||
27 | |||
28 | protected LoggerInterface $logger; |
||
29 | |||
30 | |||
31 | /** |
||
32 | * StrategyAbstract constructor. |
||
33 | * @param Environment $environment |
||
34 | * @param array<Asset> $assets |
||
35 | * @param string $type |
||
36 | */ |
||
37 | 17 | public function __construct( |
|
38 | Environment $environment, |
||
39 | array $assets, |
||
40 | string $type |
||
41 | ) { |
||
42 | 17 | $this->environment = $environment; |
|
43 | 17 | $this->assets = $assets; |
|
44 | 17 | $this->hashId = $this->generateHashId(); |
|
45 | 17 | $this->type = $type; |
|
46 | 17 | $this->logger = $environment->getLogger(); |
|
47 | } |
||
48 | |||
49 | 17 | private function generateHashId(): string |
|
54 | } |
||
55 | |||
56 | 4 | public function getHashId(): string |
|
59 | } |
||
60 | |||
62 |