Code Duplication    Length = 13-17 lines in 2 locations

src/allejo/stakx/Compiler.php 2 locations

@@ 201-217 (lines=17) @@
198
     *
199
     * @since 0.1.1
200
     */
201
    private function compileRepeaterPageViews(&$pageView)
202
    {
203
        $pageView->rewindPermalink();
204
205
        $template = $this->createTwigTemplate($pageView);
206
        $permalinks = $pageView->getRepeaterPermalinks();
207
208
        foreach ($permalinks as $permalink)
209
        {
210
            $pageView->bumpPermalink();
211
            $targetFile = $pageView->getTargetFile();
212
            $output = $this->renderRepeaterPageView($template, $pageView, $permalink);
213
214
            $this->output->notice('Writing repeater file: {file}', array('file' => $targetFile));
215
            $this->folder->writeFile($targetFile, $output);
216
        }
217
    }
218
219
    /**
220
     * @deprecated
@@ 226-238 (lines=13) @@
223
     *
224
     * @param ContentItem $contentItem
225
     */
226
    public function compileContentItem(&$contentItem)
227
    {
228
        $pageView = $contentItem->getPageView();
229
        $template = $this->createTwigTemplate($pageView);
230
231
        $contentItem->evaluateFrontMatter($pageView->getFrontMatter(false));
232
233
        $targetFile = $contentItem->getTargetFile();
234
        $output = $this->renderDynamicPageView($template, $pageView, $contentItem);
235
236
        $this->output->notice('Writing file: {file}', array('file' => $targetFile));
237
        $this->folder->writeFile($targetFile, $output);
238
    }
239
240
    ///
241
    // Redirect handling