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 | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1.0046 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 131 | public function __construct(AuthorizationCheckerInterface $authorizationChecker, $name = 'hasPermission') |
|
| 13 | { |
||
| 14 | 131 | parent::__construct( |
|
| 15 | 131 | $name, |
|
| 16 | function ($object, $permission) { |
||
| 17 | 1 | return "\$globalVariable->get('container')->get('security.authorization_checker')->isGranted($permission, $object)"; |
|
| 18 | 131 | }, |
|
| 19 | function ($arguments, $object, $permission) use ($authorizationChecker) { |
||
| 20 | return $authorizationChecker->isGranted($permission, $object); |
||
| 21 | 131 | } |
|
| 25 |