Completed
Push — master ( d7e831...2f3026 )
by Rémi
02:51
created

getThirdPartyAccount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace MessageApp\Event;
4
5
use League\Event\Event;
6
use MessageApp\User\ApplicationUserId;
7
use MessageApp\User\ThirdParty\Account;
8
9
class ThirdPartyAccountReplacedEvent extends Event
10
{
11
    /**
12
     * @var string
13
     */
14
    const NAME = 'user.3rd-party.replaced';
15
16
    /** @var ApplicationUserId */
17
    private $userId;
18
19
    /** @var Account */
20
    private $thirdPartyAccount;
21
22
    /**
23
     * ThirdPartyAccountLinkedEvent constructor.
24
     *
25
     * @param ApplicationUserId $userId
26
     * @param Account           $thirdPartyAccount
27
     */
28
    public function __construct(ApplicationUserId $userId, Account $thirdPartyAccount)
29
    {
30
        parent::__construct(self::NAME);
31
        $this->userId = $userId;
32
        $this->thirdPartyAccount = $thirdPartyAccount;
33
    }
34
35
    /**
36
     * @return ApplicationUserId
37
     */
38
    public function getUserId()
39
    {
40
        return $this->userId;
41
    }
42
43
    /**
44
     * @return Account
45
     */
46
    public function getThirdPartyAccount()
47
    {
48
        return $this->thirdPartyAccount;
49
    }
50
}
51