Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 125-128 (lines=4) @@
122
    {
123
        // This function can be called after the initial object was created and the file may have been deleted since the
124
        // creation of the object.
125
        if (!$this->fs->exists($this->filePath))
126
        {
127
            throw new FileNotFoundException(null, 0, null, $this->filePath);
128
        }
129
130
        $content = file_get_contents($this->getFilePath());
131
        $fxnName = 'from' . ucfirst($this->getExtension());

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

@@ 207-210 (lines=4) @@
204
    {
205
        // This function can be called after the initial object was created and the file may have been deleted since the
206
        // creation of the object.
207
        if (!$this->fs->exists($this->filePath))
208
        {
209
            throw new FileNotFoundException(null, 0, null, $this->filePath);
210
        }
211
212
        // $fileStructure[1] is the YAML
213
        // $fileStructure[2] is the amount of new lines after the closing `---` and the beginning of content