Code Duplication    Length = 13-17 lines in 2 locations

src/allejo/stakx/Compiler.php 2 locations

@@ 266-282 (lines=17) @@
263
     *
264
     * @since 0.1.1
265
     */
266
    private function compileRepeaterPageViews(&$pageView)
267
    {
268
        $pageView->rewindPermalink();
269
270
        $template = $this->createTwigTemplate($pageView);
271
        $permalinks = $pageView->getRepeaterPermalinks();
272
273
        foreach ($permalinks as $permalink)
274
        {
275
            $pageView->bumpPermalink();
276
            $targetFile = $pageView->getTargetFile();
277
            $output = $this->renderRepeaterPageView($template, $pageView, $permalink);
278
279
            $this->output->notice('Writing repeater file: {file}', array('file' => $targetFile));
280
            $this->folder->writeFile($targetFile, $output);
281
        }
282
    }
283
284
    /**
285
     * @deprecated
@@ 291-303 (lines=13) @@
288
     *
289
     * @param ContentItem $contentItem
290
     */
291
    public function compileContentItem(&$contentItem)
292
    {
293
        $pageView = $contentItem->getPageView();
294
        $template = $this->createTwigTemplate($pageView);
295
296
        $contentItem->evaluateFrontMatter($pageView->getFrontMatter(false));
297
298
        $targetFile = $contentItem->getTargetFile();
299
        $output = $this->renderDynamicPageView($template, $pageView, $contentItem);
300
301
        $this->output->notice('Writing file: {file}', array('file' => $targetFile));
302
        $this->folder->writeFile($targetFile, $output);
303
    }
304
305
    ///
306
    // Redirect handling