protected function flatten($attributes)
    {
        foreach ($attributes as $name => $value) {
            
            if (is_array($value)) {
                $attributes[$name] = implode(' ', array_filter($value));
            }
            
        }
        
        return $attributes;
    }
protected function flatten($attributes)
    {
        foreach ($attributes as $name => $value) {
            
            if (is_array($value)) {
                $attributes[$name] = implode(' ', array_filter($value));
            }
            
        }
        
        return $attributes;
    }
protected function flatten ( $ attributes ) { foreach ( $ attributes as $ name => $ value ) { if ( is_array ( $ value ) ) { $ attributes [ $ name ] = implode ( ' ' , array_filter ( $ value ) ) ; } } return $ attributes ; }
Flattens the given array of attributes.

@param array $attributes

@return array
Flattens the given array of attributes .