Passed
Pull Request — master (#97)
by Maximilian
04:17
created

AVGFilter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 4 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Response\Directives\APL\AVGFilter;
6
7
use MaxBeckers\AmazonAlexa\Response\Directives\APL\Document\AVGFilterType;
8
9
abstract class AVGFilter implements \JsonSerializable
10
{
11
    /**
12
     * @param AVGFilterType $type The type of the AVG filter
13
     */
14 12
    public function __construct(
15
        public AVGFilterType $type,
16
    ) {
17 12
    }
18
19 8
    public function jsonSerialize(): array
20
    {
21 8
        return [
22 8
            'type' => $this->type->value,
23 8
        ];
24
    }
25
}
26