Code Duplication    Length = 11-11 lines in 2 locations

src/allejo/stakx/Document/DataItem.php 1 location

@@ 62-72 (lines=11) @@
59
60
        $permalink = $workspace['permalink'];
61
62
        if (is_array($permalink))
63
        {
64
            $this->permalink = $permalink[0];
65
            array_shift($permalink);
66
            $this->redirects = $permalink;
67
        }
68
        else
69
        {
70
            $this->permalink = $permalink;
71
            $this->redirects = array();
72
        }
73
    }
74
75
    /**

src/allejo/stakx/FrontMatter/FrontMatterDocument.php 1 location

@@ 322-332 (lines=11) @@
319
        $permalink = (is_array($this->frontMatter) && isset($this->frontMatter['permalink'])) ?
320
            $this->frontMatter['permalink'] : $this->getPathPermalink();
321
322
        if (is_array($permalink))
323
        {
324
            $this->permalink = $permalink[0];
325
            array_shift($permalink);
326
            $this->redirects = $permalink;
327
        }
328
        else
329
        {
330
            $this->permalink = $permalink;
331
            $this->redirects = array();
332
        }
333
    }
334
335
    //