Code Duplication    Length = 5-5 lines in 2 locations

src/Plugin/Annotation.php 2 locations

@@ 158-162 (lines=5) @@
155
            $reflection = new ReflectionClass($class);
156
            $className = $reflection->getShortName();
157
158
            if ($reflection->isSubclassOf(Repository::class)) {
159
                if ($this->repositoryPostifx) {
160
                    $className = substr($className, 0, strlen($className) - strlen($this->repositoryPostifx));
161
                }
162
            }
163
164
            if ($reflection->isSubclassOf(Entity::class)) {
165
                if ($this->entityPostfix) {
@@ 164-168 (lines=5) @@
161
                }
162
            }
163
164
            if ($reflection->isSubclassOf(Entity::class)) {
165
                if ($this->entityPostfix) {
166
                    $className = substr($className, 0, strlen($className) - strlen($this->entityPostfix));
167
                }
168
            }
169
170
            $this->spaceNames[$class] = $this->toUnderscore($className);
171
        }