Passed
Push — main ( 2cd955...f234a7 )
by Anatolyi
21:01 queued 10:54
created

LuckyNumber   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 8
c 1
b 0
f 1
dl 0
loc 25
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getSeedPair() 0 3 1
A __construct() 0 4 1
A getValue() 0 3 1
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