public function arrayKeyValueFunc($key, $val, $current_array = null)
    {
        if (empty($current_array)) {
            return array($key => $val);
        }

        $current_array[$key] = $val;

        return $current_array;
    }
public function arrayKeyValueFunc($key, $val, $current_array = null)
    {
        if (empty($current_array)) {
            return array($key => $val);
        }

        $current_array[$key] = $val;

        return $current_array;
    }
public function arrayKeyValueFunc ( $ key , $ val , $ current_array = null ) { if ( empty ( $ current_array ) ) { return array ( $ key => $ val ) ; } $ current_array [ $ key ] = $ val ; return $ current_array ; }
Workaround for twig associative array initialization
Returns a key => val array

@param string $key           key of item
@param string $val           value of item
@param array  $current_array optional array to add to

@return array
Workaround for twig associative array initialization Returns a key = > val array