Code Duplication    Length = 10-10 lines in 3 locations

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

@@ 392-401 (lines=10) @@
389
     *
390
     * @throws \InvalidArgumentException
391
     */
392
    public function setByHour($value)
393
    {
394
        if (!is_integer($value) || $value < 0 || $value > 23) {
395
            throw new \InvalidArgumentException('Invalid value for BYHOUR');
396
        }
397
398
        $this->byHour = $value;
399
400
        return $this;
401
    }
402
403
    /**
404
     * The BYMINUTE rule part specifies a COMMA-separated list of minutes within an hour.
@@ 413-422 (lines=10) @@
410
     *
411
     * @throws \InvalidArgumentException
412
     */
413
    public function setByMinute($value)
414
    {
415
        if (!is_integer($value) || $value < 0 || $value > 59) {
416
            throw new \InvalidArgumentException('Invalid value for BYMINUTE');
417
        }
418
419
        $this->byMinute = $value;
420
421
        return $this;
422
    }
423
424
    /**
425
     * The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute.
@@ 434-443 (lines=10) @@
431
     *
432
     * @throws \InvalidArgumentException
433
     */
434
    public function setBySecond($value)
435
    {
436
        if (!is_integer($value) || $value < 0 || $value > 60) {
437
            throw new \InvalidArgumentException('Invalid value for BYSECOND');
438
        }
439
440
        $this->bySecond = $value;
441
442
        return $this;
443
    }
444
}
445