Code Duplication    Length = 5-5 lines in 2 locations

src/Plugin/Annotation.php 2 locations

@@ 183-187 (lines=5) @@
180
            $reflection = new ReflectionClass($class);
181
            $className = $reflection->getShortName();
182
183
            if ($reflection->isSubclassOf(Repository::class)) {
184
                if ($this->repositoryPostifx) {
185
                    $className = substr($className, 0, strlen($className) - strlen($this->repositoryPostifx));
186
                }
187
            }
188
189
            if ($reflection->isSubclassOf(Entity::class)) {
190
                if ($this->entityPostfix) {
@@ 189-193 (lines=5) @@
186
                }
187
            }
188
189
            if ($reflection->isSubclassOf(Entity::class)) {
190
                if ($this->entityPostfix) {
191
                    $className = substr($className, 0, strlen($className) - strlen($this->entityPostfix));
192
                }
193
            }
194
195
            $this->spaceNames[$class] = $this->toUnderscore($className);
196
        }