Code Duplication    Length = 12-12 lines in 2 locations

DependencyInjection/Configuration.php 2 locations

@@ 39-50 (lines=12) @@
36
                    ->isRequired()
37
                    ->validate()
38
                        ->always()
39
                        ->then(function ($value) {
40
                            if (!$value) {
41
                                return null;
42
                            }
43
                            if (!class_exists($value) || !is_a($value, 'Orbitale\Bundle\CmsBundle\Entity\Page', true)) {
44
                                throw new InvalidConfigurationException(sprintf(
45
                                    'Page class must be a valid class extending %s. "%s" given.',
46
                                    'Orbitale\Bundle\CmsBundle\Entity\Page', $value
47
                                ));
48
                            }
49
                            return $value;
50
                        })
51
                    ->end()
52
                ->end()
53
                ->scalarNode('category_class')
@@ 57-68 (lines=12) @@
54
                    ->isRequired()
55
                    ->validate()
56
                        ->always()
57
                        ->then(function ($value) {
58
                            if (!$value) {
59
                                return null;
60
                            }
61
                            if (!class_exists($value) || !is_a($value, 'Orbitale\Bundle\CmsBundle\Entity\Category', true)) {
62
                                throw new InvalidConfigurationException(sprintf(
63
                                    'Category class must be a valid class extending %s. "%s" given.',
64
                                    'Orbitale\Bundle\CmsBundle\Entity\Category', $value
65
                                ));
66
                            }
67
                            return $value;
68
                        })
69
                    ->end()
70
                ->end()
71
                ->arrayNode('layouts')