| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 138 | protected function selectFlag(int $flag, array $flags) |
|
| 28 | { |
||
| 29 | 138 | $all = \array_reduce( |
|
| 30 | 138 | $flags, |
|
| 31 | function ($result, $item) { |
||
| 32 | 138 | return $result | $item; |
|
| 33 | 138 | }, |
|
| 34 | 0 |
||
| 35 | ); |
||
| 36 | 138 | $this->setFlag($flag, true); |
|
| 37 | 138 | $this->setFlag($all & ~$flag, false); |
|
| 38 | |||
| 39 | 138 | return $this; |
|
| 40 | } |
||
| 42 |