Passed
Push — master ( 792d70...44c05d )
by Maximilian
01:22 queued 16s
created

PlaybackFinished   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\AudioPlayer;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class PlaybackFinished extends AbstractPlaybackDirective
9
{
10
    const TYPE = 'AudioPlayer.PlaybackFinished';
11
12
    /**
13
     * @param string $requestId
14
     * @param string $timestamp
15
     * @param string $token
16
     * @param int    $offsetInMilliseconds
17
     * @param string $locale
18
     *
19
     * @return PlaybackFinished
20
     */
21 1
    public static function create(string $requestId, string $timestamp, string $token, int $offsetInMilliseconds, string $locale): self
22
    {
23 1
        $playbackFinished = new self();
24
25 1
        $playbackFinished->type = self::TYPE;
26 1
        $playbackFinished->setProperties($requestId, $timestamp, $token, $offsetInMilliseconds, $locale);
27
28 1
        return $playbackFinished;
29
    }
30
}
31