Passed
Push — master ( b1c169...866aa9 )
by Tim
01:55
created

saml2debug_hook_configpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SimpleSAML\Module\saml2debug;
6
7
use SimpleSAML\Locale\Translate;
8
use SimpleSAML\Module;
9
use SimpleSAML\XHTML\Template;
10
11
/**
12
 * Hook to add the saml2debug module to the config page.
13
 *
14
 * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
15
 */
16
function saml2debug_hook_configpage(Template &$template): void
17
{
18
    $template->data['links'][] = [
19
        'href' => Module::getModuleURL('saml2debug/debug.php'),
20
        'text' => Translate::noop('SAML 2.0 Debugger'),
21
    ];
22
23
    $template->getLocalization()->addModuleDomain('saml2debug');
24
}
25