We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function __construct($name = 'hasAnyRole') |
||
| 19 | { |
||
| 20 | parent::__construct( |
||
| 21 | $name, |
||
| 22 | function ($roles) { |
||
| 23 | $code = sprintf('array_reduce(%s, function ($isGranted, $role) use ($container) { return $isGranted || $container->get(\'security.authorization_checker\')->isGranted($role); }, false)', $roles); |
||
| 24 | |||
| 25 | return $code; |
||
| 26 | } |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |