Code Duplication    Length = 7-7 lines in 3 locations

src/BCRM/BackendBundle/Entity/Event/Registration.php 2 locations

@@ 277-283 (lines=7) @@
274
    /**
275
     * @param string $food
276
     */
277
    public function setFood($food)
278
    {
279
        if (!in_array($food, array(self::FOOD_VEGAN, self::FOOD_VEGETARIAN, self::FOOD_DEFAULT))) {
280
            throw new \InvalidArgumentException("Invalid food");
281
        }
282
        $this->food = $food;
283
    }
284
285
    /**
286
     * @param \BCRM\BackendBundle\Entity\Event\Event $event
@@ 320-326 (lines=7) @@
317
    /**
318
     * @param int $type
319
     */
320
    public function setType($type)
321
    {
322
        if (!in_array($type, array(self::TYPE_NORMAL, self::TYPE_VIP, self::TYPE_SPONSOR))) {
323
            throw new \InvalidArgumentException("Invalid type");
324
        }
325
        $this->type = $type;
326
    }
327
328
    /**
329
     * @return int

src/BCRM/BackendBundle/Entity/Event/Ticket.php 1 location

@@ 272-278 (lines=7) @@
269
    /**
270
     * @param int $type
271
     */
272
    public function setType($type)
273
    {
274
        if (!in_array($type, array(Registration::TYPE_NORMAL, Registration::TYPE_VIP, Registration::TYPE_SPONSOR))) {
275
            throw new \InvalidArgumentException("Invalid type");
276
        }
277
        $this->type = $type;
278
    }
279
280
    /**
281
     * @return int