Passed
Push — master ( de89ff...d6415e )
by Tim
08:02 queued 02:23
created

consentAdmin_hook_frontpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 2
b 0
f 0
nc 1
nop 1
dl 0
loc 7
rs 10
1
<?php
2
3
use Webmozart\Assert\Assert;
4
5
/**
6
 * Hook to add the consentAdmin module to the frontpage.
7
 *
8
 * @param array &$links  The links on the frontpage, split into sections.
9
 * @return void
10
 */
11
function consentAdmin_hook_frontpage(array &$links): void
12
{
13
    Assert::keyExists($links, 'links');
14
15
    $links['config'][] = [
16
        'href' => SimpleSAML\Module::getModuleURL('consentAdmin/consentAdmin.php'),
17
        'text' => '{consentAdmin:consentadmin:link_consentAdmin}',
18
    ];
19
}
20
21