LocationServices   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 23
ccs 6
cts 6
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fromAmazonRequest() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Request;
6
7
/**
8
 * @deprecated
9
 */
10
class LocationServices
11
{
12
    public const ACCESS_ENABLED = 'ENABLED';
13
    public const ACCESS_DISABLED = 'DISABLED';
14
15
    public const STATUS_RUNNING = 'RUNNING';
16
    public const STATUS_STOPPED = 'STOPPED';
17
18
    /**
19
     * @param string $access Access status for location services
20
     * @param string $status Current status of location services
21
     */
22 1
    public function __construct(
23
        public string $access,
24
        public string $status,
25
    ) {
26 1
    }
27
28 1
    public static function fromAmazonRequest(array $amazonRequest): self
29
    {
30 1
        return new self(
31 1
            access: $amazonRequest['access'],
32 1
            status: $amazonRequest['status'],
33 1
        );
34
    }
35
}
36