AbstractAuthenticator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
c 0
b 0
f 0
dl 0
loc 34
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getIdentifier() 0 3 1
1
<?php
2
3
/**
4
 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
5
 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
6
 *
7
 * Licensed under The MIT License
8
 * For full copyright and license information, please see the LICENSE.txt
9
 * Redistributions of files must retain the above copyright notice.
10
 *
11
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
12
 * @link          https://cakephp.org CakePHP(tm) Project
13
 * @since         1.0.0
14
 * @license       https://opensource.org/licenses/mit-license.php MIT License
15
 */
16
17
declare(strict_types=1);
18
19
namespace Phauthentic\Authentication\Authenticator;
20
21
use Phauthentic\Authentication\Identifier\IdentifierInterface;
22
23
abstract class AbstractAuthenticator implements AuthenticatorInterface
24
{
25
    /**
26
     * Config
27
     *
28
     * @var mixed[]
29
     */
30
    protected array $config = [];
31
32
    /**
33
     * Identifier or identifiers collection.
34
     *
35
     * @var \Phauthentic\Authentication\Identifier\IdentifierInterface
36
     */
37
    protected IdentifierInterface $identifier;
38
39
    /**
40
     * Constructor
41
     *
42 276
     * @param \Phauthentic\Authentication\Identifier\IdentifierInterface $identifier Identifier or identifiers collection.
43
     */
44 276
    public function __construct(IdentifierInterface $identifier)
45 276
    {
46
        $this->identifier = $identifier;
47
    }
48
49
    /**
50
     * Gets the identifier.
51
     *
52 4
     * @return \Phauthentic\Authentication\Identifier\IdentifierInterface
53
     */
54 4
    public function getIdentifier(): IdentifierInterface
55
    {
56
        return $this->identifier;
57
    }
58
}
59