Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 172-175 (lines=4) @@
169
    {
170
        // This function can be called after the initial object was created and the file may have been deleted since the
171
        // creation of the object.
172
        if (!$this->fs->exists($this->filePath))
173
        {
174
            throw new FileNotFoundException(null, 0, null, $this->filePath);
175
        }
176
177
        // $fileStructure[1] is the YAML
178
        // $fileStructure[2] is the amount of new lines after the closing `---` and the beginning of content

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

@@ 166-169 (lines=4) @@
163
    {
164
        // This function can be called after the initial object was created and the file may have been deleted since the
165
        // creation of the object.
166
        if (!$this->fs->exists($this->filePath))
167
        {
168
            throw new FileNotFoundException(null, 0, null, $this->filePath);
169
        }
170
171
        $content = file_get_contents($this->getFilePath());
172
        $fxnName = 'from' . ucfirst($this->getExtension());