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

PlaybackNearlyFinished::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 5
crap 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\AudioPlayer;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class PlaybackNearlyFinished extends AbstractPlaybackDirective
9
{
10
    const TYPE = 'AudioPlayer.PlaybackNearlyFinished';
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 PlaybackNearlyFinished
20
     */
21 1
    public static function create(string $requestId, string $timestamp, string $token, int $offsetInMilliseconds, string $locale): self
22
    {
23 1
        $playbackNearlyFinished = new self();
24
25 1
        $playbackNearlyFinished->type = self::TYPE;
26 1
        $playbackNearlyFinished->setProperties($requestId, $timestamp, $token, $offsetInMilliseconds, $locale);
27
28 1
        return $playbackNearlyFinished;
29
    }
30
}
31