Code Duplication    Length = 13-17 lines in 2 locations

src/allejo/stakx/Compiler.php 2 locations

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