Code Duplication    Length = 9-13 lines in 2 locations

src/Component/TimezoneRule.php 1 location

@@ 64-72 (lines=9) @@
61
     *
62
     * @throws \InvalidArgumentException
63
     */
64
    public function __construct($ruleType)
65
    {
66
        $ruleType = strtoupper($ruleType);
67
        if ($ruleType === self::TYPE_DAYLIGHT || $ruleType === self::TYPE_STANDARD) {
68
            $this->type = $ruleType;
69
        } else {
70
            throw new \InvalidArgumentException('Invalid value for timezone rule type');
71
        }
72
    }
73
74
    /**
75
     * {@inheritdoc}

src/Component/Event.php 1 location

@@ 705-717 (lines=13) @@
702
     *
703
     * @throws \InvalidArgumentException
704
     */
705
    public function setTimeTransparency($transparency)
706
    {
707
        $transparency = strtoupper($transparency);
708
        if ($transparency === self::TIME_TRANSPARENCY_OPAQUE
709
            || $transparency === self::TIME_TRANSPARENCY_TRANSPARENT
710
        ) {
711
            $this->transparency = $transparency;
712
        } else {
713
            throw new \InvalidArgumentException('Invalid value for transparancy');
714
        }
715
716
        return $this;
717
    }
718
719
    /**
720
     * @param $status