Passed
Push — master ( 617544...6d91e7 )
by Christian
12:28 queued 11s
created

BuyBoxStruct::getApiAlias()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Content\Cms\SalesChannel\Struct;
4
5
use Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity;
6
use Shopware\Core\Content\Property\PropertyGroupCollection;
7
use Shopware\Core\Framework\Struct\Struct;
8
9
/**
10
 * @internal (flag:FEATURE_NEXT_10078)
11
 */
12
class BuyBoxStruct extends Struct
13
{
14
    /**
15
     * @var SalesChannelProductEntity|null
16
     */
17
    protected $product;
18
19
    /**
20
     * @var PropertyGroupCollection|null
21
     */
22
    protected $configuratorSettings;
23
24
    /**
25
     * @var string|null
26
     */
27
    protected $productId;
28
29
    /**
30
     * @var int
31
     */
32
    protected $totalReviews;
33
34
    public function getProduct(): ?SalesChannelProductEntity
35
    {
36
        return $this->product;
37
    }
38
39
    public function getConfiguratorSettings(): ?PropertyGroupCollection
40
    {
41
        return $this->configuratorSettings;
42
    }
43
44
    public function setConfiguratorSettings(PropertyGroupCollection $configuratorSettings): void
45
    {
46
        $this->configuratorSettings = $configuratorSettings;
47
    }
48
49
    public function setProduct(SalesChannelProductEntity $product): void
50
    {
51
        $this->product = $product;
52
    }
53
54
    public function getProductId(): ?string
55
    {
56
        return $this->productId;
57
    }
58
59
    public function setProductId(string $productId): void
60
    {
61
        $this->productId = $productId;
62
    }
63
64
    public function getTotalReviews(): ?int
65
    {
66
        return $this->totalReviews;
67
    }
68
69
    public function setTotalReviews(int $totalReviews): void
70
    {
71
        $this->totalReviews = $totalReviews;
72
    }
73
74
    public function getApiAlias(): string
75
    {
76
        return 'cms_buy_box';
77
    }
78
}
79