Code Duplication    Length = 6-6 lines in 2 locations

src/Object/FrontMatterObject.php 2 locations

@@ 295-300 (lines=6) @@
292
        $frontMatter = array();
293
        preg_match('/---(.*?)---(.*)/s', $rawFileContents, $frontMatter);
294
295
        if (count($frontMatter) != 3)
296
        {
297
            throw new IOException(sprintf("'%s' is not a valid ContentItem",
298
                    $this->fs->getFileName($this->filePath))
299
            );
300
        }
301
302
        if (empty(trim($frontMatter[2])))
303
        {
@@ 302-307 (lines=6) @@
299
            );
300
        }
301
302
        if (empty(trim($frontMatter[2])))
303
        {
304
            throw new IOException(sprintf('A ContentItem (%s) must have a body to render',
305
                    $this->fs->getFileName($this->filePath))
306
            );
307
        }
308
309
        $this->frontMatter = Yaml::parse($frontMatter[1]);
310
        $this->bodyContent = trim($frontMatter[2]);