Passed
Pull Request — master (#2)
by Pol
03:09
created

PartitionItem::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace drupol\phpartition\Partition;
6
7
use drupol\phpartition\Contract\PartitionItem as PartitionItemInterface;
8
9
/**
10
 * Class PartitionItem.
11
 */
12
class PartitionItem implements PartitionItemInterface
13
{
14
    /**
15
     * @var mixed
16
     */
17
    private $value;
18
19
    /**
20
     * PartitionItem constructor.
21
     *
22
     * @param mixed $value
23
     */
24
    public function __construct($value)
25
    {
26
        $this->value = $value;
27
    }
28
29
    /**
30
     * @return mixed
31
     */
32
    public function getValue()
33
    {
34
        return $this->value;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function getWeight(): float
41
    {
42
        return $this->value;
43
    }
44
}
45