/** * Returns all the errors! * * @param bool|true $json * * @return bool|null|string */ public static function ReturnErrors($json = true) { if (ErrorBuilder::HasErrors()) { if ($json) { return json_encode(ErrorBuilder::$errors); } return ErrorBuilder::$errors; } return null; }