Total Complexity | 2 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
5 | trait FlagTrait |
||
6 | { |
||
7 | /** @var int */ |
||
8 | private $flags; |
||
9 | |||
10 | /** |
||
11 | * Set the flags to be checked against |
||
12 | * |
||
13 | * @param int $flags |
||
14 | */ |
||
15 | 40 | protected function setFlags($flags) |
|
16 | { |
||
17 | 40 | $this->flags = $flags; |
|
18 | 40 | } |
|
19 | |||
20 | /** |
||
21 | * Is the provided flag set? |
||
22 | * |
||
23 | * @param int $flag |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | 38 | protected function isFlagSet($flag) |
|
30 | } |
||
31 | } |
||
32 |