| Total Complexity | 4 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 80% |
| 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 | 4 | public function __construct(AttributeOption $option, string $attributeCode) |
|
| 32 | { |
||
| 33 | 4 | $this->attributeCode = $attributeCode; |
|
| 34 | 4 | $this->option = $option; |
|
| 35 | 4 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * Get the attribute code. |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 4 | public function getAttributeCode(): string |
|
| 43 | { |
||
| 44 | 4 | return $this->attributeCode; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get the option. |
||
| 49 | * |
||
| 50 | * @return AttributeOption |
||
| 51 | */ |
||
| 52 | 4 | public function getOption(): AttributeOption |
|
| 53 | { |
||
| 54 | 4 | return $this->option; |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Rollback the option(s). |
||
| 59 | * |
||
| 60 | * @throws LocalizedException |
||
| 61 | */ |
||
| 62 | public function rollback(): void |
||
| 65 | } |
||
| 66 | } |
||
| 67 |