Code Duplication    Length = 6-6 lines in 2 locations

src/Object/FrontMatterObject.php 2 locations

@@ 316-321 (lines=6) @@
313
        $frontMatter = array();
314
        preg_match('/---(.*?)---(.*)/s', $rawFileContents, $frontMatter);
315
316
        if (count($frontMatter) != 3)
317
        {
318
            throw new IOException(sprintf("'%s' is not a valid ContentItem",
319
                    $this->fs->getFileName($this->filePath))
320
            );
321
        }
322
323
        if (empty(trim($frontMatter[2])))
324
        {
@@ 323-328 (lines=6) @@
320
            );
321
        }
322
323
        if (empty(trim($frontMatter[2])))
324
        {
325
            throw new IOException(sprintf('A ContentItem (%s) must have a body to render',
326
                    $this->fs->getFileName($this->filePath))
327
            );
328
        }
329
330
        $this->frontMatter = Yaml::parse($frontMatter[1]);
331
        $this->bodyContent = trim($frontMatter[2]);