Passed
Push — 1.0.0 ( 044a70...a05234 )
by Alex
01:34
created

Gender::valueNotValidMessage()   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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
namespace StraTDeS\VO\Single;
4
5
class Gender extends Enum
6
{
7
    const MALE = 'MALE';
8
    const FEMALE = 'FEMALE';
9
10 1
    public function value(): string
11
    {
12 1
        return $this->value;
13
    }
14
15 1
    protected function valueNotValidMessage($value): string
16
    {
17 1
        return "$value is not a valid gender";
18
    }
19
20 2
    public function allowedValues(): array
21
    {
22
        return [
23 2
            self::MALE,
24 2
            self::FEMALE
25
        ];
26
    }
27
}
28