Code Duplication    Length = 13-17 lines in 2 locations

src/allejo/stakx/Compiler.php 2 locations

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