Code Duplication    Length = 10-10 lines in 2 locations

src/allejo/stakx/Website.php 2 locations

@@ 336-345 (lines=10) @@
333
                'dependency' => $contentItem->getCollection(),
334
            ));
335
        }
336
        elseif ($this->dm->isHandled($filePath))
337
        {
338
            $change = $this->dm->createNewItem($filePath);
339
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
340
341
            $this->compiler->compileSome(array(
342
                'namespace'  => 'data',
343
                'dependency' => $change,
344
            ));
345
        }
346
        elseif (!is_null($this->tm) && $this->tm->isHandled($filePath))
347
        {
348
            $this->tm->createNewItem($filePath);
@@ 383-392 (lines=10) @@
380
                'dependency' => $contentItem->getCollection(),
381
            ));
382
        }
383
        elseif ($this->dm->isTracked($filePath))
384
        {
385
            $change = $this->dm->refreshItem($filePath);
386
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
387
388
            $this->compiler->compileSome(array(
389
                'namespace'  => 'data',
390
                'dependency' => $change,
391
            ));
392
        }
393
        elseif (!is_null($this->tm) && $this->tm->isTracked($filePath))
394
        {
395
            $this->tm->refreshItem($filePath);