Code Duplication    Length = 10-10 lines in 2 locations

src/allejo/stakx/Website.php 2 locations

@@ 372-381 (lines=10) @@
369
                'dependency' => $contentItem->getCollection(),
370
            ));
371
        }
372
        elseif ($this->dm->isHandled($filePath))
373
        {
374
            $change = $this->dm->createNewItem($filePath);
375
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
376
377
            $this->compiler->compileSome(array(
378
                'namespace'  => 'data',
379
                'dependency' => $change,
380
            ));
381
        }
382
        elseif (!is_null($this->tm) && $this->tm->isHandled($filePath))
383
        {
384
            $this->tm->createNewItem($filePath);
@@ 411-420 (lines=10) @@
408
                'dependency' => $contentItem->getCollection(),
409
            ));
410
        }
411
        elseif ($this->dm->isTracked($filePath))
412
        {
413
            $change = $this->dm->refreshItem($filePath);
414
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
415
416
            $this->compiler->compileSome(array(
417
                'namespace'  => 'data',
418
                'dependency' => $change,
419
            ));
420
        }
421
        elseif (!is_null($this->tm) && $this->tm->isTracked($filePath))
422
        {
423
            $this->tm->refreshItem($filePath);