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

getPreviousToken()   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
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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