CanFulfillSlot::create()   A
last analyzed

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
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\CanFulfill;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class CanFulfillSlot
9
{
10
    const CAN_UNDERSTAND_YES   = 'YES';
11
    const CAN_UNDERSTAND_MAYBE = 'MAYBE';
12
    const CAN_UNDERSTAND_NO    = 'NO';
13
    const CAN_FULFILL_YES      = 'YES';
14
    const CAN_FULFILL_NO       = 'NO';
15
16
    /**
17
     * @var string|null
18
     */
19
    public $canUnderstand;
20
21
    /**
22
     * @var string|null
23
     */
24
    public $canFulfill;
25
26
    /**
27
     * @param string $canUnderstand
28
     * @param string $canFulfill
29
     *
30
     * @return CanFulfillSlot
31
     */
32 1
    public static function create(string $canUnderstand, string $canFulfill): self
33
    {
34 1
        $slot = new self();
35
36 1
        $slot->canUnderstand = $canUnderstand;
37 1
        $slot->canFulfill    = $canFulfill;
38
39 1
        return $slot;
40
    }
41
}
42