Passed
Branch master (294c87)
by Michael
02:12
created

ModuleStats::getModuleStats()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 2
nop 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace XoopsModules\Publisher\Common;
4
5
/**
6
 * Created by PhpStorm.
7
 * User: mamba
8
 * Date: 2015-07-06
9
 * Time: 11:27
10
 */
11
12
trait ModuleStats
13
{
14
    private $db;
15
16
    /**
17
     * @return array
18
     */
19
    public static function getModuleStats($configurator, $moduleStats)
20
    {
21
        if (count($configurator->moduleStats) > 0) {
22
            foreach (array_keys($configurator->moduleStats) as $i) {
23
                $moduleStats[$i] = $configurator->moduleStats[$i];
24
            }
25
        }
26
27
        //print_r($moduleStats);
28
        return $moduleStats;
29
    }
30
}
31