Code Duplication    Length = 6-10 lines in 3 locations

Service/GeneratorService.php 3 locations

@@ 228-234 (lines=7) @@
225
                    if (!isset($association['key']) || empty($association['key']))
226
                        $association['key'] = $this->tryToGetJoinColumnNameOfMappedBy($annotation);
227
                    break;
228
                case 'Doctrine\ORM\Mapping\OneToMany':
229
                    $association['type'] = substr(get_class($annotation), 21);
230
                    $association['name'] = $property->getName();
231
                    $association['model'] = $this->getModelName($annotation->targetEntity);
232
                    $association['entity'] = $annotation->targetEntity;
233
                    $association['key'] = $this->tryToGetJoinColumnNameOfMappedBy($annotation);
234
                    break;
235
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedMany':
236
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedOne':
237
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany':
@@ 238-247 (lines=10) @@
235
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedMany':
236
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\EmbedOne':
237
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceMany':
238
                case 'Doctrine\ODM\MongoDB\Mapping\Annotations\ReferenceOne':
239
                    if ($annotation->targetDocument) {
240
                        $association['type'] = substr(get_class($annotation), 41);
241
                        $association['name'] = $property->getName();
242
                        $association['model'] = $this->getModelName($annotation->targetDocument);
243
                        $association['entity'] = $annotation->targetDocument;
244
                    } else {
245
                        $field['type'] = "auto";
246
                    }
247
                    break;
248
                case 'Doctrine\ORM\Mapping\ManyToOne':
249
                    $association['type'] = substr(get_class($annotation), 21);
250
                    $association['name'] = $property->getName();
@@ 248-253 (lines=6) @@
245
                        $field['type'] = "auto";
246
                    }
247
                    break;
248
                case 'Doctrine\ORM\Mapping\ManyToOne':
249
                    $association['type'] = substr(get_class($annotation), 21);
250
                    $association['name'] = $property->getName();
251
                    $association['model'] = $this->getModelName($annotation->targetEntity);
252
                    $association['entity'] = $annotation->targetEntity;
253
                    break;
254
                case 'Doctrine\ORM\Mapping\ManyToMany':
255
                    $association['type'] = 'ManyToMany';
256
                    $association['name'] = $property->getName();