Example #1
0
 /**
  * @throws WrongArgumentException
  * @return FloatRange
  **/
 public function setMax($max = null)
 {
     if ($max !== null) {
         Assert::isFloat($max);
     } else {
         return $this;
     }
     return parent::setMax($max);
 }
Example #2
0
 /**
  * @throws WrongArgumentException
  * @return FloatType
  **/
 public function setDefault($default)
 {
     Assert::isFloat($default, "strange default value given - '{$default}'");
     $this->default = $default;
     return $this;
 }
Example #3
0
 protected function checkNumber($number)
 {
     Assert::isFloat($number);
 }