Extension   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 12
lcom 1
cbo 0
dl 0
loc 71
rs 10
c 0
b 0
f 0
ccs 25
cts 25
cp 1

12 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A lp() 0 4 1
A light() 0 4 1
A pharma() 0 4 1
A tobacco() 0 4 1
A milk() 0 4 1
A tires() 0 4 1
A photo() 0 4 1
A shoes() 0 4 1
A perfum() 0 4 1
A getName() 0 4 1
A __toString() 0 4 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
}