| Total Complexity | 6 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class IntegerItem implements ItemInterface { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | protected $value; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Item constructor. |
||
| 25 | * @param int $value |
||
| 26 | */ |
||
| 27 | 10 | public function __construct(int $value) |
|
| 28 | { |
||
| 29 | 10 | $this->value = $value; |
|
| 30 | 10 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * @return int |
||
| 34 | */ |
||
| 35 | 11 | public function getValue(): int |
|
| 36 | { |
||
| 37 | 11 | return $this->value; |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param Comparable|IntegerItem $b |
||
| 42 | * @return int |
||
| 43 | */ |
||
| 44 | 11 | public function compareTo(Comparable $b): int |
|
| 51 | |||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param ItemInterface|IntegerItem $item |
||
| 56 | * @return bool |
||
| 57 | */ |
||
| 58 | public function equals(ItemInterface $item): bool |
||
| 63 |