Passed
Push — master ( 072a83...6ff189 )
by Tim
06:13 queued 03:55
created

metarefresh_hook_configpage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
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 8
rs 10
1
<?php
2
3
use SimpleSAML\Locale\Translate;
4
use SimpleSAML\Module;
5
use SimpleSAML\XHTML\Template;
6
7
/**
8
 * Hook to add the metarefresh module to the config page.
9
 *
10
 * @param \SimpleSAML\XHTML\Template &$template The template that we should alter in this hook.
11
 */
12
function metarefresh_hook_configpage(Template &$template)
13
{
14
    $template->data['links'][] = [
15
        'href' => Module::getModuleURL('metarefresh/fetch.php'),
16
        'text' => Template::noop('Metarefresh'),
0 ignored issues
show
Bug introduced by
The method noop() does not exist on SimpleSAML\XHTML\Template. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        'text' => Template::/** @scrutinizer ignore-call */ noop('Metarefresh'),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17
    ];
18
19
    $template->getLocalization()->addModuleDomain('metarefresh');
20
}
21