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

Scale   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 3 1
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