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

@@ 694-706 (lines=13) @@
691
     *
692
     * @throws \InvalidArgumentException
693
     */
694
    public function setTimeTransparency($transparency)
695
    {
696
        $transparency = strtoupper($transparency);
697
        if ($transparency === self::TIME_TRANSPARENCY_OPAQUE
698
            || $transparency === self::TIME_TRANSPARENCY_TRANSPARENT
699
        ) {
700
            $this->transparency = $transparency;
701
        } else {
702
            throw new \InvalidArgumentException('Invalid value for transparancy');
703
        }
704
705
        return $this;
706
    }
707
708
    /**
709
     * @param $status