Issuer::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php declare(strict_types=1);
2
3
namespace CustomerGauge\Cognito;
4
5
final class Issuer
6
{
7
    private $userPoolId;
8
9
    private $region;
10
11 4
    public function __construct(string $userPoolId, string $region)
12
    {
13 4
        $this->userPoolId = $userPoolId;
14 4
        $this->region = $region;
15
    }
16
17 4
    public function toString(): string
18
    {
19 4
        $url = 'https://cognito-idp.%s.amazonaws.com/%s';
20
21 4
        return sprintf($url, $this->region, $this->userPoolId);
22
    }
23
}
24