This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
32
{
33
12
if (!is_int($interval) || (int) $interval < 0) {
34
1
throw new \InvalidArgumentException('Interval should be positive integer');
35
}
36
37
11
$this->interval = (int) $interval;
38
11
}
39
40
/**
41
* @param int $multiplier
42
*/
43
11
public function setMultiplier($multiplier)
44
{
45
11
if (!is_int($multiplier) || $multiplier < 1) {
46
throw new \InvalidArgumentException('Multiplier should be positive integer');
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.