Value   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 35
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A toAmoArray() 0 8 1
1
<?php
2
3
namespace mb24dev\AmoCRM\Entity;
4
5
/**
6
 * Class Value
7
 *
8
 * @package mb24dev\AmoCRM\Entity
9
 */
10
class Value implements AmoEntityInterface
11
{
12
    private $value;
13
    private $enum;
14
    /**
15
     * @var null
16
     */
17
    private $subtype;
18
19
    /**
20
     * Value constructor.
21
     *
22
     * @param      $value
23
     * @param      $enum
24
     * @param null $subtype
25
     */
26
    public function __construct($value, $enum = null, $subtype = null)
27
    {
28
        $this->value = $value;
29
        $this->enum = $enum;
30
        $this->subtype = $subtype;
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    public function toAmoArray()
37
    {
38
        return [
39
            'value' => $this->value,
40
            'enum' => $this->enum,
41
            'subtype' => $this->subtype,
42
        ];
43
    }
44
}
45