Code Duplication    Length = 15-15 lines in 2 locations

src/AppBundle/Admin/PerformanceEventAdmin.php 2 locations

@@ 169-183 (lines=15) @@
166
            self::getRows($venue, $category->getRows(), $category->getVenueSector(), $category->getPlaces());
167
        }
168
        self::inspectSeatWithoutPrice(count($seat), $performanceEvent, $venue);
169
        if (!$performanceEvent->getSeriesNumber()) {
170
            $performanceEvent->setEnableSale(null);
171
            $em->persist($performanceEvent);
172
            $em->flush();
173
            $this
174
                ->getConfigurationPool()
175
                ->getContainer()
176
                ->get('session')
177
                ->getFlashBag()
178
                ->add(
179
                    'error',
180
                    "Помилка. Введіть номер комплекта квитків!"
181
                );
182
            throw new ModelManagerException();
183
        }
184
        if ((count($seat) === count($this->seatPrice)) && ($performanceEvent->isEnableSale() === null)) {
185
            $performanceEvent->setEnableSale(false);
186
            $em->persist($performanceEvent);
@@ 338-352 (lines=15) @@
335
    private function inspectSeatWithoutPrice($countSeat, PerformanceEvent $performanceEvent, Venue $venue)
336
    {
337
        $em = $this->getConfigurationPool()->getContainer()->get('Doctrine')->getManager();
338
        if ($countSeat != count($this->seatPrice)) {
339
            $performanceEvent->setEnableSale(null);
340
            $em->persist($performanceEvent);
341
            $em->flush();
342
            $this
343
                ->getConfigurationPool()
344
                ->getContainer()
345
                ->get('session')
346
                ->getFlashBag()
347
                ->add(
348
                    'error',
349
                    "Помилка. В залi $venue ціна проставлена не на всі місця!"
350
                );
351
            throw new ModelManagerException();
352
        }
353
    }
354
}
355