| Total Complexity | 4 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class SimpleNumber |
||
| 10 | {
|
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $number; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var integer |
||
| 19 | */ |
||
| 20 | protected $value; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * SimpleNumber constructor. |
||
| 24 | * @param string $number |
||
| 25 | * @param int $value |
||
| 26 | */ |
||
| 27 | 1 | public function __construct(string $number, int $value) |
|
| 28 | {
|
||
| 29 | 1 | $this->number = $number; |
|
| 30 | 1 | $this->value = $value; |
|
| 31 | 1 | } |
|
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Returns number as a string eg. FV/2019/0023 |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 1 | public function getNumber(): string |
|
| 40 | {
|
||
| 41 | |||
| 42 | 1 | return $this->number; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Returns a value of a number eg. 23 |
||
| 47 | * |
||
| 48 | * @return integer |
||
| 49 | */ |
||
| 50 | 1 | public function getValue(): int |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | 1 | public function __toString() |
|
| 61 | } |
||
| 62 | |||
| 64 |