Property::value()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Th3Mouk\ReactiveKlaviyo;
6
7
final class Property
8
{
9
    /** @var string */
10
    private $name;
11
    /** @var string|int|float|bool|array<string|int|float|bool> */
12
    private $value;
13
14
    /**
15
     * @param string|int|float|bool|array<string|int|float|bool> $value
16
     */
17
    private function __construct(string $name, $value)
18
    {
19
        $this->name  = $name;
20
        $this->value = $value;
21
    }
22
23
    /**
24
     * @param string|int|float|bool|array<string|int|float|bool> $value
25
     */
26
    public static function create(string $name, $value): self
27
    {
28
        return new self($name, $value);
29
    }
30
31
    public function name(): string
32
    {
33
        return $this->name;
34
    }
35
36
    /**
37
     * @return string|int|float|bool|array<string|int|float|bool>
38
     */
39
    public function value()
40
    {
41
        return $this->value;
42
    }
43
}
44