Extension::pharma()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\OmsClient\V2;
6
7
final class Extension
8
{
9
    /**
10
     * @var string
11
     */
12
    private $name;
13
14
    /**
15
     * OmsApiExtension constructor.
16
     * @param string $name
17
     */
18 13
    private function __construct(string $name)
19
    {
20 13
        $this->name = $name;
21 13
    }
22
23 5
    public static function lp(): self
24
    {
25 5
        return new static('lp');
26
    }
27
28 6
    public static function light(): self
29
    {
30 6
        return new static('light');
31
    }
32
33 1
    public static function pharma(): self
34
    {
35 1
        return new static('pharma');
36
    }
37
38 1
    public static function tobacco(): self
39
    {
40 1
        return new static('tobacco');
41
    }
42
43 2
    public static function milk(): self
44
    {
45 2
        return new static('milk');
46
    }
47
48 1
    public static function tires(): self
49
    {
50 1
        return new static('tires');
51
    }
52
53 1
    public static function photo(): self
54
    {
55 1
        return new static('photo');
56
    }
57
58 5
    public static function shoes(): self
59
    {
60 5
        return new static('shoes');
61
    }
62
63 6
    public static function perfum(): self
64
    {
65 6
        return new static('perfum');
66
    }
67
68 7
    public function getName(): string
69
    {
70 7
        return $this->name;
71
    }
72
73 5
    public function __toString(): string
74
    {
75 5
        return $this->name;
76
    }
77
}