Passed
Push — master ( 517dad...fbc4e3 )
by Christian
10:43 queued 11s
created

SalesChannelContextTokenChangeEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 37
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCurrentToken() 0 3 1
A __construct() 0 5 1
A getPreviousToken() 0 3 1
A getSalesChannelContext() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\System\SalesChannel\Event;
4
5
use Shopware\Core\System\SalesChannel\SalesChannelContext;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8
class SalesChannelContextTokenChangeEvent extends Event
9
{
10
    /**
11
     * @var SalesChannelContext
12
     */
13
    protected $salesChannelContext;
14
15
    /**
16
     * @var string
17
     */
18
    protected $previousToken;
19
20
    /**
21
     * @var string
22
     */
23
    protected $currentToken;
24
25
    public function __construct(SalesChannelContext $salesChannelContext, string $previousToken, string $currentToken)
26
    {
27
        $this->salesChannelContext = $salesChannelContext;
28
        $this->previousToken = $previousToken;
29
        $this->currentToken = $currentToken;
30
    }
31
32
    public function getSalesChannelContext(): SalesChannelContext
33
    {
34
        return $this->salesChannelContext;
35
    }
36
37
    public function getPreviousToken(): string
38
    {
39
        return $this->previousToken;
40
    }
41
42
    public function getCurrentToken(): string
43
    {
44
        return $this->currentToken;
45
    }
46
}
47