ProductBundleSlotOptions::setPosition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Created by solutionDrive GmbH
7
 *
8
 * @copyright 2018 solutionDrive GmbH
9
 */
10
11
namespace solutionDrive\SyliusProductBundlesPlugin\Service\Options;
12
13
class ProductBundleSlotOptions implements ProductBundleSlotOptionsInterface
14
{
15
    /** @var int */
16
    private $position;
17
18
    /** @var bool */
19
    private $isPresentationSlot = false;
20
21
    /** @var mixed[] */
22
    private $additionalOptions = [];
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function addOption(string $name, $value): void
28
    {
29
        $this->additionalOptions[$name] = $value;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function getOption(string $name)
36
    {
37
        return $this->additionalOptions[$name];
38
    }
39
40
    public function setPosition(int $position): void
41
    {
42
        $this->position = $position;
43
    }
44
45
    public function getPosition(): int
46
    {
47
        return $this->position;
48
    }
49
50
    public function setAsPresentationSlot(): void
51
    {
52
        $this->isPresentationSlot = true;
53
    }
54
55
    public function isPresentationSlot(): bool
56
    {
57
        return $this->isPresentationSlot;
58
    }
59
}
60