Lines
100.00%
3 / 3
Methods
100.00%
3 / 3
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| current | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| learn | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 9 | final class InMemoryVersions implements Versions | |
| 10 | { | |
| 11 | private ClientVersion $current; | |
| 12 | ||
| 13 | public function __construct(?ClientVersion $current = null) | |
| 14 | { | |
| 15 | $this->current = $current ?? new ClientVersion(Login::VERSION); | |
| 16 | } | |
| 17 | ||
| 18 | #[Override] | |
| 19 | public function current(): ClientVersion | |
| 20 | { | |
| 21 | return $this->current; | |
| 22 | } | |
| 23 | ||
| 24 | #[Override] | |
| 25 | public function learn(ClientVersion $version): void | |
| 26 | { | |
| 27 | $this->current = $version; | |
| 28 | } | |
| 29 | } |