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