Code Duplication    Length = 10-10 lines in 2 locations

src/allejo/stakx/Website.php 2 locations

@@ 325-334 (lines=10) @@
322
                $this->creationQueue[$filePath] = true;
323
            }
324
        }
325
        elseif ($this->dm->shouldBeTracked($filePath))
326
        {
327
            $change = $this->dm->createNewItem($filePath);
328
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
329
330
            $this->compiler->compileSome([
331
                'namespace' => 'data',
332
                'dependency' => $change,
333
            ]);
334
        }
335
        elseif (!is_null($this->tm) && $this->tm->shouldBeTracked($filePath))
336
        {
337
            $this->tm->createNewItem($filePath);
@@ 384-393 (lines=10) @@
381
                'dependency' => $contentItem->getNamespace(),
382
            ]);
383
        }
384
        elseif ($this->dm->isTracked($filePath))
385
        {
386
            $change = $this->dm->refreshItem($filePath);
387
            TwigManager::getInstance()->addGlobal('data', $this->dm->getDataItems());
388
389
            $this->compiler->compileSome([
390
                'namespace' => 'data',
391
                'dependency' => $change,
392
            ]);
393
        }
394
        elseif (!is_null($this->tm) && $this->tm->isTracked($filePath))
395
        {
396
            $this->tm->refreshItem($filePath);