Passed
Push — master ( f9c14b...c6fe8b )
by Laurens
02:03
created

Scale::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\NestApi\Client\Device\Thermostat\Temperature;
6
7
use Werkspot\Enum\AbstractEnum;
8
9
/**
10
 * @method static Scale celsius()
11
 * @method bool isCelsius()
12
 * @method static Scale fahrenheit()
13
 * @method bool isFahrenheit()
14
 */
15
final class Scale extends AbstractEnum
16
{
17
    private const CELSIUS =  'c';
18
    private const FAHRENHEIT =  'f';
19
20 13
    public static function get($value): AbstractEnum
21
    {
22 13
        return parent::get(strtolower($value));
23
    }
24
}
25