ModuleStats   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 16
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getModuleStats() 0 9 3
1
<?php
2
3
namespace XoopsModules\Wggithub\Common;
4
5
/*
6
 You may not change or alter any portion of this comment or credits
7
 of supporting developers from this source code or any supporting source code
8
 which is considered copyrighted (c) material of the original comment or credit authors.
9
10
 This program is distributed in the hope that it will be useful,
11
 but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
*/
14
15
/**
16
 * Feedback plugin for xoops modules
17
 *
18
 * @copyright      XOOPS Project  (https://xoops.org)
19
 * @license        GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
20
 * @author         Michael Beck <[email protected]>
21
 */
22
trait ModuleStats
23
{
24
    /**
25
     * @param \XoopsModules\Wggithub\Common\Configurator $configurator
26
     * @param array                                       $moduleStats
27
     * @return array
28
     */
29
    public static function getModuleStats($configurator, $moduleStats)
30
    {
31
        if (\count($configurator->moduleStats) > 0) {
32
            foreach (\array_keys($configurator->moduleStats) as $i) {
33
                $moduleStats[$i] = $configurator->moduleStats[$i];
34
            }
35
        }
36
37
        return $moduleStats;
38
    }
39
}
40