Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 114-125 (lines=12) @@
111
    /**
112
     * {@inheritdoc}
113
     */
114
    public function createJail()
115
    {
116
        $whiteListedFunctions = array_merge(FrontMatterDocument::$whiteListedFunctions, [
117
        ]);
118
119
        $jailedFunctions = [
120
            'getPageView' => 'getJailedPageView',
121
            'getDataset'  => 'getNamespace',
122
        ];
123
124
        return (new JailedDocument($this, $whiteListedFunctions, $jailedFunctions));
125
    }
126
127
    ///
128
    // JsonSerializable implementation

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

@@ 81-92 (lines=12) @@
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function createJail()
82
    {
83
        $whiteListedFunctions = array_merge(self::$whiteListedFunctions, [
84
        ]);
85
86
        $jailedFunctions = [
87
            'getPageView'   => 'getJailedPageView',
88
            'getCollection' => 'getNamespace',
89
        ];
90
91
        return (new JailedDocument($this, $whiteListedFunctions, $jailedFunctions));
92
    }
93
94
    /**
95
     * {@inheritdoc}