Passed
Push — master ( b9addd...bd3c1c )
by Enjoys
01:53
created

StrategyAbstract::createDirectory()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 3.4746

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 7
c 1
b 0
f 0
nc 3
nop 2
dl 0
loc 14
ccs 5
cts 8
cp 0.625
crap 3.4746
rs 10
1
<?php
2
3
namespace Enjoys\AssetsCollector\CollectStrategy;
4
5
use Enjoys\AssetsCollector\Asset;
6
use Enjoys\AssetsCollector\Environment;
7
use Psr\Log\LoggerInterface;
8
9
abstract class StrategyAbstract implements StrategyInterface
10
{
11
    /**
12
     * @var array<Asset>
13
     */
14
    protected array $assetsCollection;
15
16
    /**
17
     * @var string css|js
18
     */
19
    protected string $type;
20
21
    /**
22
     * @var Environment
23
     */
24
    protected Environment $environment;
25
26
    protected LoggerInterface $logger;
27
28
29
    /**
30
     * StrategyAbstract constructor.
31
     * @param Environment $environment
32
     * @param array<Asset> $assetsCollection
33
     * @param string $type
34
     */
35 7
    public function __construct(
36
        Environment $environment,
37
        array $assetsCollection,
38
        string $type
39
    ) {
40 7
        $this->environment = $environment;
41 7
        $this->assetsCollection = $assetsCollection;
42 7
        $this->type = $type;
43 7
        $this->logger = $environment->getLogger();
44 7
    }
45
46
}
47