Code Duplication    Length = 11-11 lines in 2 locations

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

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

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

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