mambax7/groupmanager

View on GitHub
class/Common/ModuleStats.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace XoopsModules\Groupmanager\Common;

/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/




/**
 * Feedback plugin for xoops modules
 *
 * @copyright      XOOPS Project  (https://xoops.org)
 * @license        GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
 * @author         Michael Beck <mambax7@gmailc.com>
 */
trait ModuleStats
{
    /**
     * @param \XoopsModules\Groupmanager\Common\Configurator $configurator
     * @param array                                          $moduleStats
     * @return array
     */
    public static function getModuleStats($configurator, $moduleStats)
    {
        if (\count($configurator->moduleStats) > 0) {
            foreach (\array_keys($configurator->moduleStats) as $i) {
                $moduleStats[$i] = $configurator->moduleStats[$i];
            }
        }

        return $moduleStats;
    }
}