Code Duplication    Length = 9-11 lines in 2 locations

src/RunOpenCode/AbstractBuilder/Utils/ClassUtils.php 2 locations

@@ 99-109 (lines=11) @@
96
     *
97
     * @return string
98
     */
99
    public static function getNamespace($class)
100
    {
101
        if ($class instanceof ClassMetadata) {
102
            $class = $class->getName();
103
        }
104
105
        $parts = explode('\\', $class);
106
        array_pop($parts);
107
108
        return implode('\\', $parts);
109
    }
110
111
    /**
112
     * Get short name of class.
@@ 118-126 (lines=9) @@
115
     *
116
     * @return string
117
     */
118
    public static function getShortName($class)
119
    {
120
        if ($class instanceof ClassMetadata) {
121
            return $class->getShortName();
122
        }
123
124
        $parts = explode('\\', $class);
125
126
        return array_pop($parts);
127
    }
128
}
129