Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | final class Attributes extends AbstractBlock |
||
20 | { |
||
21 | public const TARGET_PARENT = 0; |
||
22 | public const TARGET_PREVIOUS = 1; |
||
23 | public const TARGET_NEXT = 2; |
||
24 | |||
25 | /** @var array<string, mixed> */ |
||
26 | private $attributes; |
||
27 | |||
28 | /** @var int */ |
||
29 | private $target = self::TARGET_NEXT; |
||
30 | |||
31 | /** |
||
32 | * @param array<string, mixed> $attributes |
||
33 | */ |
||
34 | 15 | public function __construct(array $attributes) |
|
35 | { |
||
36 | 15 | parent::__construct(); |
|
37 | |||
38 | 15 | $this->attributes = $attributes; |
|
39 | 15 | } |
|
40 | |||
41 | /** |
||
42 | * @return array<string, mixed> |
||
43 | */ |
||
44 | 15 | public function getAttributes(): array |
|
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param array<string, mixed> $attributes |
||
51 | */ |
||
52 | 3 | public function setAttributes(array $attributes): void |
|
53 | { |
||
54 | 3 | $this->attributes = $attributes; |
|
55 | 3 | } |
|
56 | |||
57 | 15 | public function getTarget(): int |
|
58 | { |
||
59 | 15 | return $this->target; |
|
60 | } |
||
61 | |||
62 | 12 | public function setTarget(int $target): void |
|
65 | 12 | } |
|
66 | } |
||
67 |