Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SymfonyUserWithPermissionDecorator | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPermissionIdentifiers | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Apie\ApieBundle\Security; |
| 4 | |
| 5 | use Apie\Core\Lists\PermissionList; |
| 6 | use Apie\Core\Permissions\PermissionInterface; |
| 7 | use Symfony\Component\Security\Core\User\UserInterface; |
| 8 | |
| 9 | class SymfonyUserWithPermissionDecorator extends SymfonyUserDecorator implements PermissionInterface |
| 10 | { |
| 11 | public function __construct(UserInterface&PermissionInterface $user) |
| 12 | { |
| 13 | parent::__construct($user); |
| 14 | } |
| 15 | |
| 16 | public function getPermissionIdentifiers(): PermissionList |
| 17 | { |
| 18 | $user = $this->getUser(); |
| 19 | assert($user instanceof PermissionInterface); |
| 20 | return $user->getPermissionIdentifiers(); |
| 21 | } |
| 22 | } |