Code Duplication    Length = 8-8 lines in 3 locations

src/Indexing/Option/Infrastructure/AbstractOption.php 1 location

@@ 22-29 (lines=8) @@
19
    /**
20
     * @return static
21
     */
22
    public static function getInstance()
23
    {
24
        $className = get_called_class();
25
        if (!isset(self::$registry[$className])) {
26
            self::$registry[$className] = new static();
27
        }
28
        return self::$registry[$className];
29
    }
30
}
31

src/Mapping/Type/Infrastructure/AbstractType.php 1 location

@@ 24-31 (lines=8) @@
21
        return $this->getId();
22
    }
23
24
    public static function getInstance()
25
    {
26
        $class = get_called_class();
27
        if (!isset(self::$registry[$class])) {
28
            self::$registry[$class] = new static();
29
        }
30
        return self::$registry[$class];
31
    }
32
}
33

src/Mapping/Type/Parameter/Infrastructure/AbstractParameter.php 1 location

@@ 29-36 (lines=8) @@
26
        return false;
27
    }
28
29
    public static function getInstance()
30
    {
31
        $className = get_called_class();
32
        if (!isset(static::$registry[$className])) {
33
            static::$registry[$className] = new static();
34
        }
35
        return static::$registry[$className];
36
    }
37
}
38