for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created for IG Monitoring.
* User: jakim <[email protected]>
* Date: 11.01.2018
*/
namespace app\components;
use yii\helpers\BaseArrayHelper;
class ArrayHelper extends BaseArrayHelper
{
public static function arrayMap($data, array $map): array
$res = [];
foreach ($map as $to => $from) {
$res[$to] = static::getValue($data, $from);
}
return $res;