Passed
Push — master ( eaf682...6209eb )
by
unknown
05:05 queued 02:33
created

YogurtCorePreload   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
eloc 6
c 2
b 0
f 0
dl 0
loc 28
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A eventCoreIncludeCommonEnd() 0 3 1
A eventCoreEdituserStart() 0 4 2
A eventCoreUserinfoStart() 0 4 2
1
<?php declare(strict_types=1);
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
8
 This program is distributed in the hope that it will be useful,
9
 but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
*/
12
13
/**
14
 * @copyright       XOOPS Project (https://xoops.org)
15
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
16
 * @author          XOOPS Project <www.xoops.org> <www.xoops.ir>
17
 */
18
defined(
19
    'XOOPS_ROOT_PATH'
20
)
21
|| die('Restricted access.');
22
23
/**
24
 * Class YogurtCorePreload
25
 */
26
class YogurtCorePreload extends XoopsPreloadItem
27
{
28
    // to add PSR-4 autoloader
29
30
    /**
31
     * @param $args
32
     */
33
    public static function eventCoreIncludeCommonEnd($args)
34
    {
35
        require __DIR__ . '/autoloader.php';
36
    }
37
	
38
    /**
39
     * @param $args
40
     */
41
    public static function eventCoreEdituserStart($args)
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed. ( Ignorable by Annotation )

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

41
    public static function eventCoreEdituserStart(/** @scrutinizer ignore-unused */ $args)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
42
    {
43
        header('location: ./modules/yogurt/edituser.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
44
        exit();
45
    }
46
47
	/**
48
     * @param $args
49
     */
50
    public static function eventCoreUserinfoStart($args)
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed. ( Ignorable by Annotation )

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

50
    public static function eventCoreUserinfoStart(/** @scrutinizer ignore-unused */ $args)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
51
    {
52
        header('location: ./modules/yogurt/index.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
53
        exit();
54
    }
55
	
56
}
57