public function loop(array $collection, string $block, string $emptyBlock = null): string
    {
        if (empty($collection)) {
            return isset($emptyBlock) ? trim($this->make($emptyBlock)) . PHP_EOL : PHP_EOL;
        } else {
            $items = '';
            foreach ($collection as $key => $item) {
                $items .= rtrim($this->make($block, ['key' => $key, 'item' => $item]));
            }

            return ltrim($items) . PHP_EOL;
        }
    }