Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | function get_area_abilities($currentUser) |
||
33 | { |
||
34 | $abilities = $currentUser->can('superadmin') ? app('cortex.auth.ability')->all() : $currentUser->getAbilities(); |
||
35 | $abilities = $abilities->groupBy('entity_type')->map->pluck('title', 'id')->sortKeys()->toArray(); |
||
36 | |||
37 | return $abilities; |
||
38 | } |
||
39 | } |
||
40 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.