Code Duplication    Length = 13-13 lines in 2 locations

Mapping/Driver/YmlMetadataDriver.php 2 locations

@@ 173-185 (lines=13) @@
170
                }
171
                $metadata->mapManyToOne($mapping);
172
                break;
173
            case 'oneToMany':
174
                $mapping['type'] = EntityMetadata::ONE_TO_MANY;
175
                if (array_key_exists('mappedBy', $association)) {
176
                    $mapping['mappedBy'] = $association['mappedBy'];
177
                }
178
                if (array_key_exists('orderBy', $association)) {
179
                    $mapping['orderBy'] = $association['orderBy'];
180
                }
181
                if (array_key_exists('indexBy', $association)) {
182
                    $mapping['indexBy'] = $association['indexBy'];
183
                }
184
                $metadata->mapOneToMany($mapping);
185
                break;
186
            case 'manyToMany':
187
                $mapping['type'] = EntityMetadata::MANY_TO_MANY;
188
                if (array_key_exists('api_field', $association)) {
@@ 186-198 (lines=13) @@
183
                }
184
                $metadata->mapOneToMany($mapping);
185
                break;
186
            case 'manyToMany':
187
                $mapping['type'] = EntityMetadata::MANY_TO_MANY;
188
                if (array_key_exists('api_field', $association)) {
189
                    $mapping['api_field'] = $association['api_field'];
190
                }
191
                if (array_key_exists('orderBy', $association)) {
192
                    $mapping['orderBy'] = $association['orderBy'];
193
                }
194
                if (array_key_exists('indexBy', $association)) {
195
                    $mapping['indexBy'] = $association['indexBy'];
196
                }
197
                $metadata->mapManyToMany($mapping);
198
                break;
199
        }
200
    }
201