ConfidentialClient   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPassword() 0 3 1
A __construct() 0 4 1
A hasCredentials() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 07/01/2018
6
 * Time: 13:37
7
 */
8
9
namespace OAuth2\Roles\ClientTypes;
10
11
/**
12
 * Class ClientPasswordType
13
 * @package OAuth2\Roles\Clients\Types
14
 */
15
abstract class ConfidentialClient extends RegisteredClient implements ConfidentialClientInterface
16
{
17
    protected $password;
18
19
    public function __construct(string $identifier, string $password, ClientMetadataInterface $metadata)
20
    {
21
        parent::__construct($identifier, $metadata);
22
        $this->password = $password;
23
    }
24
25
    /**
26
     * @return string
27
     */
28
    public function getPassword(): string
29
    {
30
        return $this->password;
31
    }
32
33
    public function hasCredentials(): bool
34
    {
35
        return true;
36
    }
37
}