UserWasLoggedIn   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUser() 0 4 1
1
<?php namespace Anomaly\UsersModule\User\Event;
2
3
use Anomaly\UsersModule\User\Contract\UserInterface;
4
5
/**
6
 * Class UserWasLoggedIn
7
 *
8
 * @link          http://pyrocms.com/
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12
class UserWasLoggedIn
13
{
14
15
    /**
16
     * The user object.
17
     *
18
     * @var UserInterface
19
     */
20
    protected $user;
21
22
    /**
23
     * Create a new UserWasLoggedIn instance.
24
     *
25
     * @param UserInterface $user
26
     */
27
    function __construct(UserInterface $user)
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...
28
    {
29
        $this->user = $user;
30
    }
31
32
    /**
33
     * Get the user.
34
     *
35
     * @return UserInterface
36
     */
37
    public function getUser()
38
    {
39
        return $this->user;
40
    }
41
}
42