Conditions | 5 |
Paths | 5 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
3 | function es_root($request, $args) { |
||
2 ignored issues
–
show
|
|||
4 | |||
5 | global $ES; |
||
6 | |||
7 | $indices = $ES->indices()->getAliases(); |
||
8 | $indexes = []; |
||
9 | foreach ($indices as $index => $alieses) { |
||
10 | if (strpos($index, ".") !== 0) { |
||
11 | $params['index'] = $index; |
||
12 | $index_data = []; |
||
13 | $index_data['name'] = $index; |
||
14 | $index_info = $ES->indices()->getMapping($params); |
||
15 | foreach ($index_info[$index]['mappings'] as $type => $type_info) { |
||
16 | if ($type == '_default_') { continue; } |
||
17 | $index_data['types'][] = $type; |
||
18 | } |
||
19 | $indexes[] = $index_data; |
||
20 | } |
||
21 | } |
||
22 | return ['data'=>['indexes' => $indexes], 'app_title'=>'Indexes']; |
||
23 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.