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