/** * {@inheritDoc} */ public function isRequiredPositiveFloat($value, $suppressException = true) { /* Clear the last error. */ $this->lastError = null; /* If valid just return true. */ if (Validator::isRequiredPositiveFloat($value)) { return true; } /* Set the error message. */ $type = gettype($value); $this->lastError = sprintf('Expected positive float, \'%s\' given.', 'double' === $type ? 'zero or negative float' : $type); return $this->validationFailed($suppressException); }