UserWasKickedOut::getUser()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Anomaly\UsersModule\User\Event;
2
3
use Anomaly\UsersModule\User\Contract\UserInterface;
4
5
/**
6
 * Class UserWasKickedOut
7
 *
8
 * @link          http://pyrocms.com/
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12
class UserWasKickedOut
13
{
14
15
    /**
16
     * The user object.
17
     *
18
     * @var UserInterface
19
     */
20
    protected $user;
21
22
    /**
23
     * The reason code the
24
     * user was kicked out.
25
     *
26
     * @var string
27
     */
28
    protected $reason;
29
30
    /**
31
     * Create a new UserWasKickedOut instance.
32
     *
33
     * @param UserInterface $user
34
     * @param               $reason
35
     */
36
    function __construct(UserInterface $user, $reason)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
37
    {
38
        $this->user   = $user;
39
        $this->reason = $reason;
40
    }
41
42
    /**
43
     * Get the user.
44
     *
45
     * @return UserInterface
46
     */
47
    public function getUser()
48
    {
49
        return $this->user;
50
    }
51
52
    /**
53
     * Get the reason.
54
     *
55
     * @return string
56
     */
57
    public function getReason()
58
    {
59
        return $this->reason;
60
    }
61
}
62