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

@@ 739-751 (lines=13) @@
736
     *
737
     * @throws \InvalidArgumentException
738
     */
739
    public function setTimeTransparency($transparency)
740
    {
741
        $transparency = strtoupper($transparency);
742
        if ($transparency === self::TIME_TRANSPARENCY_OPAQUE
743
            || $transparency === self::TIME_TRANSPARENCY_TRANSPARENT
744
        ) {
745
            $this->transparency = $transparency;
746
        } else {
747
            throw new \InvalidArgumentException('Invalid value for transparancy');
748
        }
749
750
        return $this;
751
    }
752
753
    /**
754
     * @param $status