command = $command; $this->ratio = $ratio; $this->param = ''; } /** * @internal * @return bool */ function isValid() { return is_string($this->command) && is_string($this->param) && self::isRatio($this->ratio); } /** * @internal * @param float $ratio * @return bool */ static function isRatio($ratio) { return is_float($ratio) && ($ratio === -1. || ($ratio >= 0. && $ratio <= 1.)); } }