Code Duplication    Length = 3-5 lines in 2 locations

src/Kunstmaan/FixturesBundle/Builder/PagePartBuilder.php 1 location

@@ 53-57 (lines=5) @@
50
        $translations = $fixture->getTranslations();
51
        $original = $fixture->getEntity();
52
53
        if (!isset($params['page']) || empty($translations)) {
54
            throw new \Exception(
55
                'No page reference and/or translations detected for pagepart fixture ' . $fixture->getName() . ' (' . $fixture->getClass() . ')'
56
            );
57
        }
58
59
        $pageFixture = $params['page'];
60
        if (!$pageFixture instanceof Fixture) {

src/Kunstmaan/FixturesBundle/Builder/PageBuilder.php 1 location

@@ 76-78 (lines=3) @@
73
        $entity = $fixture->getEntity();
74
        $fixtureParams = $fixture->getParameters();
75
        $translations = $fixture->getTranslations();
76
        if (empty($translations)) {
77
            throw new \Exception('No translations detected for page fixture ' . $fixture->getName() . ' (' . $fixture->getClass() . ')');
78
        }
79
80
        $internalName = array_key_exists('page_internal_name', $fixtureParams) ?
81
            $fixtureParams['page_internal_name'] : null;