Passed
Pull Request — main (#1)
by Anatolyi
10:58
created

LuckyNumber::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gambling\Tech\Game;
6
7
class LuckyNumber
8
{
9
    private float $value;
10
11
    private SeedPair $seedPair;
12
13
    public function __construct(float $value, SeedPair $seedPair)
14
    {
15
        $this->value = $value;
16
        $this->seedPair = $seedPair;
17
    }
18
19
    public function getValue(): float
20
    {
21
        return $this->value;
22
    }
23
24
    public function getSeedPair(): SeedPair
25
    {
26
        return $this->seedPair;
27
    }
28
29
    public function __toString(): string
30
    {
31
        return (string)$this->value;
32
    }
33
}
34