Passed
Push — develop ( d0561f...3c99fb )
by Enea
03:29
created

Authorization   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A make() 0 3 1
A getName() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author enea dhack <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Enea\Authorization\Drivers\Cache;
13
14
class Authorization
15
{
16
    private $name;
17
18 5
    public function __construct(string $name)
19
    {
20 5
        $this->name = $name;
21 5
    }
22
23 5
    public function getName(): string
24
    {
25 5
        return $this->name;
26
    }
27
28 5
    public static function make(string $name): Authorization
29
    {
30 5
        return new static($name);
31
    }
32
}
33