Code Duplication    Length = 9-9 lines in 3 locations

src/OroCRM/Bundle/DemoDataBundle/Migrations/Data/Demo/ORM/LoadUsersCalendarData.php 3 locations

@@ 217-225 (lines=9) @@
214
            /** @var Calendar $calendar */
215
            $calendar = $this->calendar->findDefaultCalendar($user->getId(), $user->getOrganization()->getId());
216
217
            if (mt_rand(0, 1)) {
218
                $calendarProperty = new CalendarProperty();
219
                $calendarProperty
220
                    ->setTargetCalendar($calendarAdmin)
221
                    ->setCalendarAlias('user')
222
                    ->setCalendar($calendar->getId());
223
224
                $this->em->persist($calendarProperty);
225
            }
226
227
            if (mt_rand(0, 1)) {
228
                $calendarProperty = new CalendarProperty();
@@ 227-235 (lines=9) @@
224
                $this->em->persist($calendarProperty);
225
            }
226
227
            if (mt_rand(0, 1)) {
228
                $calendarProperty = new CalendarProperty();
229
                $calendarProperty
230
                    ->setTargetCalendar($calendarSale)
231
                    ->setCalendarAlias('user')
232
                    ->setCalendar($calendar->getId());
233
234
                $this->em->persist($calendarProperty);
235
            }
236
237
            if (mt_rand(0, 1)) {
238
                $calendarProperty = new CalendarProperty();
@@ 237-245 (lines=9) @@
234
                $this->em->persist($calendarProperty);
235
            }
236
237
            if (mt_rand(0, 1)) {
238
                $calendarProperty = new CalendarProperty();
239
                $calendarProperty
240
                    ->setTargetCalendar($calendarMarket)
241
                    ->setCalendarAlias('user')
242
                    ->setCalendar($calendar->getId());
243
244
                $this->em->persist($calendarProperty);
245
            }
246
247
            $this->em->persist($calendar);
248
        }