Code Duplication    Length = 11-11 lines in 2 locations

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

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

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

@@ 35-45 (lines=11) @@
32
        $permalink = (is_array($this->frontMatter) && isset($this->frontMatter['permalink'])) ?
33
            $this->frontMatter['permalink'] : $this->getPathPermalink();
34
35
        if (is_array($permalink))
36
        {
37
            $this->permalink = $permalink[0];
38
            array_shift($permalink);
39
            $this->redirects = $permalink;
40
        }
41
        else
42
        {
43
            $this->permalink = $permalink;
44
            $this->redirects = [];
45
        }
46
    }
47
}
48