ExportItem   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

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