Passed
Branch master (1c832c)
by Michael
05:44 queued 44s
created

ModuleStats   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getModuleStats() 0 9 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace XoopsModules\Publisher\Common;
6
7
/**
8
 * Created by PhpStorm.
9
 * User: mamba
10
 * Date: 2015-07-06
11
 * Time: 11:27
12
 */
13
trait ModuleStats
14
{
15
    /**
16
     * @param \XoopsModules\Publisher\Common\Configurator $configurator
17
     * @param array                                       $moduleStats
18
     * @return array
19
     */
20
21
    public static function getModuleStats($configurator, $moduleStats)
22
    {
23
        if (\count($configurator->moduleStats) > 0) {
24
            foreach (\array_keys($configurator->moduleStats) as $i) {
25
                $moduleStats[$i] = $configurator->moduleStats[$i];
26
            }
27
        }
28
29
        return $moduleStats;
30
    }
31
}
32