Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class OptionFixture |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $attributeCode; |
||
19 | |||
20 | /** |
||
21 | * @var AttributeOption |
||
22 | */ |
||
23 | private $option; |
||
24 | |||
25 | /** |
||
26 | * OptionFixture constructor. |
||
27 | * |
||
28 | * @param AttributeOption $option |
||
29 | * @param string $attributeCode |
||
30 | */ |
||
31 | 9 | public function __construct(AttributeOption $option, string $attributeCode) |
|
32 | { |
||
33 | 9 | $this->attributeCode = $attributeCode; |
|
34 | 9 | $this->option = $option; |
|
35 | 9 | } |
|
36 | |||
37 | /** |
||
38 | * Get the attribute code. |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 6 | public function getAttributeCode(): string |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get the option. |
||
49 | * |
||
50 | * @return AttributeOption |
||
51 | */ |
||
52 | 8 | public function getOption(): AttributeOption |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Rollback the option(s). |
||
59 | * |
||
60 | * @throws LocalizedException |
||
61 | */ |
||
62 | 2 | public function rollback(): void |
|
67 |