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 ThirdPartyAccountLinkedEvent extends Event
10
{
11
    /** @var string */
12
    const NAME = 'user.3rd-party.linked';
13
14
    /** @var ApplicationUserId */
15
    private $userId;
16
17
    /** @var Account */
18
    private $thirdPartyAccount;
19
20
    /**
21
     * ThirdPartyAccountLinkedEvent constructor.
22
     *
23
     * @param ApplicationUserId $userId
24
     * @param Account           $thirdPartyAccount
25
     */
26
    public function __construct(ApplicationUserId $userId, Account $thirdPartyAccount)
27
    {
28
        parent::__construct(self::NAME);
29
        $this->userId = $userId;
30
        $this->thirdPartyAccount = $thirdPartyAccount;
31
    }
32
33
    /**
34
     * @return ApplicationUserId
35
     */
36
    public function getUserId()
37
    {
38
        return $this->userId;
39
    }
40
41
    /**
42
     * @return Account
43
     */
44
    public function getThirdPartyAccount()
45
    {
46
        return $this->thirdPartyAccount;
47
    }
48
}
49