Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | public function __invoke(\Elgg\Event $event): array { |
||
20 | $body_vars = $event->getValue(); |
||
21 | |||
22 | $fields = [ |
||
23 | 'contact', |
||
24 | 'expires', |
||
25 | 'encryption', |
||
26 | 'acknowledgments', |
||
27 | 'language', |
||
28 | 'canonical', |
||
29 | 'policy', |
||
30 | 'hiring', |
||
31 | 'csaf', |
||
32 | ]; |
||
33 | foreach ($fields as $field) { |
||
34 | $body_vars[$field] = elgg_extract($field, $body_vars, elgg_get_config("security_txt_{$field}")); |
||
35 | } |
||
36 | |||
37 | return $body_vars; |
||
38 | } |
||
40 |