Code Duplication    Length = 5-5 lines in 2 locations

src/Plugin/Annotation.php 2 locations

@@ 192-196 (lines=5) @@
189
            $reflection = new ReflectionClass($class);
190
            $className = $reflection->getShortName();
191
192
            if ($reflection->isSubclassOf(Repository::class)) {
193
                if ($this->repositoryPostifx) {
194
                    $className = substr($className, 0, strlen($className) - strlen($this->repositoryPostifx));
195
                }
196
            }
197
198
            if ($reflection->isSubclassOf(Entity::class)) {
199
                if ($this->entityPostfix) {
@@ 198-202 (lines=5) @@
195
                }
196
            }
197
198
            if ($reflection->isSubclassOf(Entity::class)) {
199
                if ($this->entityPostfix) {
200
                    $className = substr($className, 0, strlen($className) - strlen($this->entityPostfix));
201
                }
202
            }
203
204
            $this->spaceNames[$class] = $this->toUnderscore($className);
205
        }