Extension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 6 1
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\Document;
6
7
class Extension implements \JsonSerializable
8
{
9 8
    public function __construct(
10
        public string $name,
11
        public string $uri,
12
        public bool $required = false,
13
    ) {
14 8
    }
15
16 4
    public function jsonSerialize(): array
17
    {
18 4
        return [
19 4
            'name' => $this->name,
20 4
            'uri' => $this->uri,
21 4
            'required' => $this->required,
22 4
        ];
23
    }
24
}
25