Test Failed
Pull Request — master (#11)
by Florian
07:04 queued 04:09
created

Failure   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 38
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResult() 0 3 1
A getAuthenticator() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * Copyright (c) Phauthentic (https://github.com/Phauthentic)
5
 *
6
 * Licensed under The MIT License
7
 * For full copyright and license information, please see the LICENSE.txt
8
 * Redistributions of files must retain the above copyright notice.
9
 *
10
 * @copyright     Copyright (c) Phauthentic (https://github.com/Phauthentic)
11
 * @link          https://github.com/Phauthentic
12
 * @license       https://opensource.org/licenses/mit-license.php MIT License
13
 */
14
15
declare(strict_types=1);
16
17
namespace Phauthentic\Authentication\Authenticator;
18
19
class Failure implements FailureInterface
20
{
21
    /**
22
     * @var \Phauthentic\Authentication\Authenticator\AuthenticatorInterface
23
     */
24
    protected AuthenticatorInterface $authenticator;
25
26
    /**
27
     * @var \Phauthentic\Authentication\Authenticator\ResultInterface
28
     */
29
    protected ResultInterface $result;
30
31
    /**
32
     * Constructor.
33
     *
34
     * @param \Phauthentic\Authentication\Authenticator\AuthenticatorInterface $authenticator Authenticator.
35
     * @param \Phauthentic\Authentication\Authenticator\ResultInterface $result Result.
36
     */
37 5
    public function __construct(AuthenticatorInterface $authenticator, ResultInterface $result)
38
    {
39 5
        $this->authenticator = $authenticator;
40 5
        $this->result = $result;
41
    }
42
43
    /**
44
     * {@inheritDoc}
45
     */
46 3
    public function getAuthenticator(): AuthenticatorInterface
47
    {
48 3
        return $this->authenticator;
49
    }
50
51
    /**
52
     * {@inheritDoc}
53
     */
54 3
    public function getResult(): ResultInterface
55
    {
56 3
        return $this->result;
57
    }
58
}
59