Total Complexity | 6 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | class DepsInternal |
||
11 | { |
||
12 | const TAG_NAME = '@deps-internal'; |
||
13 | |||
14 | /** |
||
15 | * @var FQSEN |
||
16 | */ |
||
17 | protected $fqsen; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $options; |
||
23 | |||
24 | /** |
||
25 | * @var FQSEN[] |
||
26 | */ |
||
27 | protected $targets = []; |
||
28 | |||
29 | /** |
||
30 | * @param FQSEN $fqsen |
||
31 | * @param string[] $options |
||
32 | * @deps-internal \DependencyAnalyzer\DependencyGraphBuilder\ExtraPhpDocTagResolver |
||
33 | */ |
||
34 | public function __construct(FQSEN $fqsen, array $options = []) |
||
35 | { |
||
36 | $this->fqsen = $fqsen; |
||
37 | $this->options = $options; |
||
38 | |||
39 | try { |
||
40 | foreach ($this->options as $option) { |
||
41 | $this->targets[] = FullyQualifiedStructuralElementName::createFromString($option); |
||
42 | } |
||
43 | } catch (InvalidFullyQualifiedStructureElementNameException $e) { |
||
44 | throw $e; |
||
45 | } |
||
46 | } |
||
47 | |||
48 | public function getFqsen(): FQSEN |
||
49 | { |
||
50 | return $this->fqsen; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @return FQSEN[] |
||
55 | */ |
||
56 | public function getTargets(): array |
||
59 | } |
||
60 | |||
61 | public function getTargetsAsString(): array |
||
64 | } |
||
65 | } |
||
66 |