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

@@ 257-267 (lines=11) @@
254
        $permalink = (is_array($this->frontMatter) && isset($this->frontMatter['permalink'])) ?
255
            $this->frontMatter['permalink'] : $this->getPathPermalink();
256
257
        if (is_array($permalink))
258
        {
259
            $this->permalink = $permalink[0];
260
            array_shift($permalink);
261
            $this->redirects = $permalink;
262
        }
263
        else
264
        {
265
            $this->permalink = $permalink;
266
            $this->redirects = array();
267
        }
268
    }
269
270
    //