Code Duplication    Length = 10-10 lines in 3 locations

src/Eluceo/iCal/Property/Event/RecurrenceRule.php 3 locations

@@ 383-392 (lines=10) @@
380
     *
381
     * @throws \InvalidArgumentException
382
     */
383
    public function setByHour($value)
384
    {
385
        if (!is_integer($value) || $value < 0 || $value > 23) {
386
            throw new \InvalidArgumentException('Invalid value for BYHOUR');
387
        }
388
389
        $this->byHour = $value;
390
391
        return $this;
392
    }
393
394
    /**
395
     * The BYMINUTE rule part specifies a COMMA-separated list of minutes within an hour.
@@ 404-413 (lines=10) @@
401
     *
402
     * @throws \InvalidArgumentException
403
     */
404
    public function setByMinute($value)
405
    {
406
        if (!is_integer($value) || $value < 0 || $value > 59) {
407
            throw new \InvalidArgumentException('Invalid value for BYMINUTE');
408
        }
409
410
        $this->byMinute = $value;
411
412
        return $this;
413
    }
414
415
    /**
416
     * The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute.
@@ 425-434 (lines=10) @@
422
     *
423
     * @throws \InvalidArgumentException
424
     */
425
    public function setBySecond($value)
426
    {
427
        if (!is_integer($value) || $value < 0 || $value > 60) {
428
            throw new \InvalidArgumentException('Invalid value for BYSECOND');
429
        }
430
431
        $this->bySecond = $value;
432
433
        return $this;
434
    }
435
}
436