Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public static function getPermissionsForNames(array $names, int $resourceType, ProcessEngineConfiguration $engineConfiguration): array |
||
16 | { |
||
17 | $permissions = []; |
||
18 | |||
19 | for ($i = 0; i < count($names); $i += 1) { |
||
20 | $permissions[] = $engineConfiguration->getPermissionProvider()->getPermissionForName($names[$i], $resourceType); |
||
21 | } |
||
22 | |||
23 | return $permissions; |
||
24 | } |
||
56 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: