Lines 0.00% 0 / 6
Methods 0.00% 0 / 2
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 markLost 0.00% 0 / 3 0.00% 0 / 1 2
 markRestored 0.00% 0 / 3 0.00% 0 / 1 2
7final class ConnectionStatus
8{
9    public private(set) bool $connected = true;
10
11    public function markLost(): bool
12    {
13        $changed = $this->connected;
14        $this->connected = false;
15
16        return $changed;
17    }
18
19    public function markRestored(): bool
20    {
21        $changed = !$this->connected;
22        $this->connected = true;
23
24        return $changed;
25    }
26}