Completed
Pull Request — master (#11)
by Arnold
03:10
created

AbstractEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Jasny\Auth\Event;
6
7
use Jasny\Auth\Auth;
8
use Jasny\Auth\UserInterface as User;
9
10
/**
11
 * Base class for all auth events.
12
 */
13
abstract class AbstractEvent
14
{
15
    protected User $user;
16
17
    /**
18
     * AbstractEvent constructor.
19
     */
20 2
    public function __construct(Auth $_, User $user)
1 ignored issue
show
Unused Code introduced by
The parameter $_ is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
    public function __construct(/** @scrutinizer ignore-unused */ Auth $_, User $user)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
    {
22 2
        $this->user = $user;
23 2
    }
24
25
    /**
26
     * Get the user.
27
     */
28 1
    final public function user(): User
29
    {
30 1
        return $this->user;
31
    }
32
}
33