Passed
Push — master ( 0ad537...62a59e )
by Enea
12:21 queued 12s
created

Attributor::getAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Created by enea dhack - 12/07/2020 11:19.
4
 */
5
6
namespace Vaened\Enum;
7
8
class Attributor
9
{
10
    private string $case;
11
12
    private array $attributes;
13
14
    public function __construct(string $case, array $attributes)
15
    {
16
        $this->case = $case;
17
        $this->attributes = $attributes;
18
    }
19
20
    public static function to(string $case, array $attributes): static
21
    {
22
        return new static($case, $attributes);
23
    }
24
25
    public function getCase(): string
26
    {
27
        return $this->case;
28
    }
29
30
    public function getAttributes(): array
31
    {
32
        return $this->attributes;
33
    }
34
}
35