PlaybackStopped::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 5
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Response\Directives\AudioPlayer;
6
7
class PlaybackStopped extends AbstractPlaybackDirective
8
{
9
    public const TYPE = 'AudioPlayer.PlaybackStopped';
10
11 1
    public function __construct(
12
        string $requestId = '',
13
        string $timestamp = '',
14
        string $token = '',
15
        int $offsetInMilliseconds = 0,
16
        string $locale = ''
17
    ) {
18 1
        parent::__construct($requestId, $timestamp, $token, $offsetInMilliseconds, $locale);
19 1
        $this->type = self::TYPE;
20
    }
21
22
    /**
23
     * @param string $requestId
24
     * @param string $timestamp
25
     * @param string $token
26
     * @param int $offsetInMilliseconds
27
     * @param string $locale
28
     *
29
     * @return PlaybackStopped
30
     */
31 1
    public static function create(string $requestId, string $timestamp, string $token, int $offsetInMilliseconds, string $locale): self
32
    {
33 1
        return new self($requestId, $timestamp, $token, $offsetInMilliseconds, $locale);
34
    }
35
}
36