Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait HaveBitwiseFlag |
||
8 | { |
||
9 | private $flags; |
||
10 | |||
11 | 132 | protected function isFlagSet(int $flag): bool |
|
12 | { |
||
13 | 132 | return (($this->flags & $flag) == $flag); |
|
14 | } |
||
15 | |||
16 | 138 | protected function setFlag(int $flag, bool $value) |
|
25 | } |
||
26 | |||
27 | 138 | protected function selectFlag(int $flag, array $flags) |
|
42 |