Code Duplication    Length = 10-10 lines in 2 locations

src/Mapping/Object.php 2 locations

@@ 228-237 (lines=10) @@
225
        if (null !== $definition = $model->getDefinition()) {
226
            $object->hasActivityDefinition = true;
227
228
            if (null !== $name = $definition->getName()) {
229
                $object->hasActivityName = true;
230
                $object->activityName = array();
231
232
                foreach ($name->languageTags() as $languageTag) {
233
                    $object->activityName[$languageTag] = $name[$languageTag];
234
                }
235
            } else {
236
                $object->hasActivityName = false;
237
            }
238
239
            if (null !== $description = $definition->getDescription()) {
240
                $object->hasActivityDescription = true;
@@ 239-248 (lines=10) @@
236
                $object->hasActivityName = false;
237
            }
238
239
            if (null !== $description = $definition->getDescription()) {
240
                $object->hasActivityDescription = true;
241
                $object->activityDescription = array();
242
243
                foreach ($description->languageTags() as $languageTag) {
244
                    $object->activityDescription[$languageTag] = $description[$languageTag];
245
                }
246
            } else {
247
                $object->hasActivityDescription = false;
248
            }
249
250
            if (null !== $type = $definition->getType()) {
251
                $object->activityType = $type->getValue();