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