Liquid: added missing bounds check for setDecay()

This commit is contained in:
Dylan K. Taylor 2022-01-28 21:03:44 +00:00
parent 7a75fcda44
commit e9a6c0ba58
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -83,6 +83,9 @@ abstract class Liquid extends Transparent{
/** @return $this */
public function setDecay(int $decay) : self{
if($decay < 0 || $decay > 7){
throw new \InvalidArgumentException("Decay must be in range 0-7");
}
$this->decay = $decay;
return $this;
}