AlumniPreload::eventCoreIncludeCommonClassmaps()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/*
3
 You may not change or alter any portion of this comment or credits
4
 of supporting developers from this source code or any supporting source code
5
 which is considered copyrighted (c) material of the original comment or credit authors.
6
7
 This program is distributed in the hope that it will be useful,
8
 but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
*/
11
12
use Xoops\Core\PreloadItem;
13
14
/**
15
 * @copyright       XOOPS Project https://xoops.org/
16
 * @license         GNU GPL V2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
17
 * @package         publisher
18
 * @author          trabis <[email protected]>
19
 * @version         $Id$
20
 */
21
22
/**
23
 * Alumni core preloads
24
 *
25
 * @copyright       XOOPS Project https://xoops.org/
26
 * @license         GNU GPL V2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
27
 * @author          XOOPS Development Team
28
 */
29
class AlumniPreload extends PreloadItem
0 ignored issues
show
Coding Style introduced by
AlumniPreload does not seem to conform to the naming convention (Utils?$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
30
{
31
    /**
32
     * @param $args
33
     */
34
    public static function eventCoreIncludeCommonClassmaps($args)
35
    {
36
        $path = dirname(__DIR__);
37
        XoopsLoad::addMap([
38
                              'alumnimetagen' => $path . '/class/metagen.php',
39
                              'alumni'        => $path . '/class/helper.php',
40
                              //    'alumniutils' => $path . '/class/utils.php',
0 ignored issues
show
Unused Code Comprehensibility introduced by
46% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
41
                              //     'alumniblockform' => $path . '/class/blockform.php',
0 ignored issues
show
Unused Code Comprehensibility introduced by
46% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
42
                          ]);
43
    }
44
}
45