Code Duplication    Length = 9-9 lines in 3 locations

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

@@ 208-216 (lines=9) @@
205
            /** @var Calendar $calendar */
206
            $calendar = $this->calendar->findDefaultCalendar($user->getId(), $user->getOrganization()->getId());
207
208
            if (mt_rand(0, 1)) {
209
                $calendarProperty = new CalendarProperty();
210
                $calendarProperty
211
                    ->setTargetCalendar($calendarAdmin)
212
                    ->setCalendarAlias('user')
213
                    ->setCalendar($calendar->getId());
214
215
                $this->em->persist($calendarProperty);
216
            }
217
218
            if (mt_rand(0, 1)) {
219
                $calendarProperty = new CalendarProperty();
@@ 218-226 (lines=9) @@
215
                $this->em->persist($calendarProperty);
216
            }
217
218
            if (mt_rand(0, 1)) {
219
                $calendarProperty = new CalendarProperty();
220
                $calendarProperty
221
                    ->setTargetCalendar($calendarSale)
222
                    ->setCalendarAlias('user')
223
                    ->setCalendar($calendar->getId());
224
225
                $this->em->persist($calendarProperty);
226
            }
227
228
            if (mt_rand(0, 1)) {
229
                $calendarProperty = new CalendarProperty();
@@ 228-236 (lines=9) @@
225
                $this->em->persist($calendarProperty);
226
            }
227
228
            if (mt_rand(0, 1)) {
229
                $calendarProperty = new CalendarProperty();
230
                $calendarProperty
231
                    ->setTargetCalendar($calendarMarket)
232
                    ->setCalendarAlias('user')
233
                    ->setCalendar($calendar->getId());
234
235
                $this->em->persist($calendarProperty);
236
            }
237
238
            $this->em->persist($calendar);
239
        }