Code Duplication    Length = 13-17 lines in 2 locations

src/allejo/stakx/Compiler.php 2 locations

@@ 230-246 (lines=17) @@
227
     *
228
     * @since 0.1.1
229
     */
230
    private function compileRepeaterPageViews(&$pageView)
231
    {
232
        $pageView->rewindPermalink();
233
234
        $template = $this->createTwigTemplate($pageView);
235
        $permalinks = $pageView->getRepeaterPermalinks();
236
237
        foreach ($permalinks as $permalink)
238
        {
239
            $pageView->bumpPermalink();
240
            $targetFile = $pageView->getTargetFile();
241
            $output = $this->renderRepeaterPageView($template, $pageView, $permalink);
242
243
            $this->output->notice('Writing repeater file: {file}', array('file' => $targetFile));
244
            $this->folder->writeFile($targetFile, $output);
245
        }
246
    }
247
248
    /**
249
     * @deprecated
@@ 255-267 (lines=13) @@
252
     *
253
     * @param ContentItem $contentItem
254
     */
255
    public function compileContentItem(&$contentItem)
256
    {
257
        $pageView = $contentItem->getPageView();
258
        $template = $this->createTwigTemplate($pageView);
259
260
        $contentItem->evaluateFrontMatter($pageView->getFrontMatter(false));
261
262
        $targetFile = $contentItem->getTargetFile();
263
        $output = $this->renderDynamicPageView($template, $pageView, $contentItem);
264
265
        $this->output->notice('Writing file: {file}', array('file' => $targetFile));
266
        $this->folder->writeFile($targetFile, $output);
267
    }
268
269
    ///
270
    // Redirect handling