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

AVGFilter::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 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