Code Duplication    Length = 37-37 lines in 2 locations

Tests/Resources/ddd/generated/BitPrepared/Bundle/FormazioneBundle/Domain/ValueObject/TipologiaCampo.php 1 location

@@ 8-44 (lines=37) @@
5
/**
6
 * Tipologia di campo CFM/CFT/CCG/CAM
7
 */
8
abstract class TipologiaCampo
9
{
10
    /**
11
     * nome esplicativo della enum
12
     *
13
     * @var string
14
     */
15
    protected $name;
16
17
    /**
18
     * Singleton instance for enum
19
     *
20
     * @var BitPrepared\Bundle\FormazioneBundle\Domain\ValueObject\TipologiaCampo
21
     */
22
    protected static $instance;
23
24
    /**
25
     * @return string
26
     */
27
    final public function getName()
28
    {
29
        return $this->name;
30
    }
31
32
    /**
33
     * @return BitPrepared\Bundle\FormazioneBundle\Domain\ValueObject\TipologiaCampo|null
34
     */
35
    final public static function parseString($parseString)
36
    {
37
        $className = 'BitPrepared\Bundle\FormazioneBundle\Domain\ValueObject\TipologiaCampo'.'\\'.$parseString;
38
        if (class_exists($className)) {
39
            $enumClass = $className::instance();
40
41
            return $enumClass;
42
        }
43
    }
44
}
45

Tests/Resources/php/EnumTest.php 1 location

@@ 8-44 (lines=37) @@
5
/**
6
 * Generated Class
7
 */
8
abstract class EnumTest
9
{
10
    /**
11
     * nome esplicativo della enum
12
     *
13
     * @var string
14
     */
15
    protected $name;
16
17
    /**
18
     * Singleton instance for enum
19
     *
20
     * @var TestNamespace\EnumTest
21
     */
22
    protected static $instance;
23
24
    /**
25
     * @return string
26
     */
27
    final public function getName()
28
    {
29
        return $this->name;
30
    }
31
32
    /**
33
     * @return TestNamespace\EnumTest|null
34
     */
35
    final public static function parseString($parseString)
36
    {
37
        $className = 'TestNamespace\EnumTest'.'\\'.$parseString;
38
        if (class_exists($className)) {
39
            $enumClass = $className::instance();
40
41
            return $enumClass;
42
        }
43
    }
44
}
45