Passed
Push — master ( 52d8c5...e14e38 )
by Tim
02:49 queued 46s
created

metarefresh_hook_frontpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
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 links to the frontpage.
7
 *
8
 * @param array &$links  The links on the frontpage, split into sections.
9
 * @return void
10
 */
11
function metarefresh_hook_frontpage(array &$links)
12
{
13
    Assert::keyExists($links, 'links');
14
15
    $links['federation'][] = [
16
        'href' => SimpleSAML\Module::getModuleURL('metarefresh/fetch.php'),
17
        'text' => '{metarefresh:metarefresh:frontpage_link}',
18
    ];
19
}
20