Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class All implements AssertionInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var AssertionInterface[] |
||
16 | */ |
||
17 | private $asserts; |
||
18 | |||
19 | /** |
||
20 | * Check if all asserts are true |
||
21 | * |
||
22 | * @param AssertionInterface ...$asserts |
||
23 | */ |
||
24 | 15 | public function __construct(AssertionInterface ...$asserts) |
|
27 | 15 | } |
|
28 | |||
29 | /** |
||
30 | * Assert that all given assert are correct (AND logic) |
||
31 | * |
||
32 | * @param Acl $acl |
||
33 | * @param RoleInterface $role |
||
34 | * @param ResourceInterface $resource |
||
35 | * @param string $privilege |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | 2 | public function assert(Acl $acl, RoleInterface $role = null, ResourceInterface $resource = null, $privilege = null) |
|
50 |