ConfidentialClient::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
}