Code Duplication    Length = 8-8 lines in 2 locations

Form/EnumTypeGuesser.php 1 location

@@ 40-47 (lines=8) @@
37
     * @param ManagerRegistry $registry        Registry
38
     * @param array           $registeredTypes Array of registered ENUM types
39
     */
40
    public function __construct(ManagerRegistry $registry, array $registeredTypes)
41
    {
42
        parent::__construct($registry);
43
44
        foreach ($registeredTypes as $type => $details) {
45
            $this->registeredEnumTypes[$type] = $details['class'];
46
        }
47
    }
48
49
    /**
50
     * Returns a field guess for a property name of a class.

Twig/Extension/AbstractEnumExtension.php 1 location

@@ 32-39 (lines=8) @@
29
     *
30
     * @param array $registeredTypes Array of registered ENUM types
31
     */
32
    public function __construct(array $registeredTypes)
33
    {
34
        foreach ($registeredTypes as $type => $details) {
35
            if (is_subclass_of($details['class'], '\Fresh\DoctrineEnumBundle\DBAL\Types\AbstractEnumType')) {
36
                $this->registeredEnumTypes[$type] = $details['class'];
37
            }
38
        }
39
    }
40
41
    /**
42
     * {@inheritdoc}