protected function fixIconsArray(array $icons)
    {
        $array = [];
        foreach ($icons as $rel => $data) {
            foreach ((array) $data['sizes'] as $size) {
                $array[] = array_merge_recursive(
                    [
                        'rel'   => $rel,
                        'sizes' => "{$size}x{$size}",
                        'href'  => sprintf($data['pattern'], $size),
                    ],
                    (isset($data['attr']) ? $data['attr'] : [])
                );
            }
        }
        return $array;
    }