| 1 | <?php |
||
| 10 | class User_Capability_Condition extends Condition { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Check if a user has any of the supplied capabilities |
||
| 14 | * |
||
| 15 | * @param array<string> $capabilities |
||
| 16 | * @return boolean |
||
| 17 | */ |
||
| 18 | protected function user_can_any( $user_id, $capabilities ) { |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Check if the condition is fulfilled |
||
| 29 | * |
||
| 30 | * @param array $environment |
||
| 31 | * @return bool |
||
| 32 | */ |
||
| 33 | public function is_fulfilled( $environment ) { |
||
| 56 | } |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.