Code Duplication    Length = 5-5 lines in 2 locations

src/Plugin/Annotation.php 2 locations

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