Passed
Push — trunk ( 17375e...d9bd07 )
by Christian
12:35 queued 12s
created

CompileThemeMessage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 29
rs 10
c 1
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A isWithAssets() 0 3 1
A getContext() 0 3 1
A __construct() 0 6 1
A getThemeId() 0 3 1
A getSalesChannelId() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Storefront\Theme\Message;
4
5
use Shopware\Core\Framework\Context;
6
use Shopware\Core\Framework\Log\Package;
7
use Shopware\Core\Framework\MessageQueue\AsyncMessageInterface;
8
9
/**
10
 * @internal
11
 *
12
 * used to compile the themes in the queue
13
 */
14
#[Package('storefront')]
15
class CompileThemeMessage implements AsyncMessageInterface
16
{
17
    public function __construct(
18
        private readonly string $salesChannelId,
19
        private readonly string $themeId,
20
        private readonly bool $withAssets,
21
        private readonly Context $context
22
    ) {
23
    }
24
25
    public function getSalesChannelId(): string
26
    {
27
        return $this->salesChannelId;
28
    }
29
30
    public function getThemeId(): string
31
    {
32
        return $this->themeId;
33
    }
34
35
    public function isWithAssets(): bool
36
    {
37
        return $this->withAssets;
38
    }
39
40
    public function getContext(): Context
41
    {
42
        return $this->context;
43
    }
44
}
45