Passed
Push — develop ( a1f3e3...8f45f4 )
by Enea
03:43
created

Struct::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
crap 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 Struct
15
{
16
    private $name;
17
18 23
    public function __construct(string $name)
19
    {
20 23
        $this->name = $name;
21 23
    }
22
23 23
    public function getName(): string
24
    {
25 23
        return $this->name;
26
    }
27
28 23
    public static function make(string $name): Struct
29
    {
30 23
        return new static($name);
31
    }
32
}
33