UserWasKickedOut   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 50
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getUser() 0 4 1
A getReason() 0 4 1
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