Passed
Pull Request — master (#97)
by Maximilian
03:49
created

AbstractPlaybackDirective   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 25%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setProperties() 0 7 1
A __construct() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Response\Directives\AudioPlayer;
6
7
use MaxBeckers\AmazonAlexa\Response\Directives\Directive;
8
9
abstract class AbstractPlaybackDirective extends Directive
10
{
11 9
    public function __construct(
12
        public string $requestId = '',
13
        public string $timestamp = '',
14
        public string $token = '',
15
        public int $offsetInMilliseconds = 0,
16
        public string $locale = ''
17
    ) {
18 9
        parent::__construct();
19
    }
20
21
    public function setProperties(string $requestId, string $timestamp, string $token, int $offsetInMilliseconds, string $locale): void
22
    {
23
        $this->requestId = $requestId;
24
        $this->timestamp = $timestamp;
25
        $this->token = $token;
26
        $this->offsetInMilliseconds = $offsetInMilliseconds;
27
        $this->locale = $locale;
28
    }
29
}
30