Permission   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromAmazonRequest() 0 7 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Request\Request\AlexaSkillEvent;
4
5
use MaxBeckers\AmazonAlexa\Helper\PropertyHelper;
6
7
/**
8
 * @author Maximilian Beckers <[email protected]>
9
 */
10
class Permission
11
{
12
    /**
13
     * @var string|null
14
     */
15
    public $scope;
16
17
    /**
18
     * @param array $amazonRequest
19
     *
20
     * @return Permission
21
     */
22 2
    public static function fromAmazonRequest(array $amazonRequest): self
23
    {
24 2
        $permission = new self();
25
26 2
        $permission->scope = PropertyHelper::checkNullValueString($amazonRequest, 'scope');
27
28 2
        return $permission;
29
    }
30
}
31