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

ModuleStats::getModuleStats()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
eloc 4
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 9
rs 10
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