From 7ddd9521b3f3a397da3b0a6b56238d31414eb4be Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 28 Oct 2010 19:17:36 +0000 Subject: Standardized code in all of core, not including language files, tests, or core mods. git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ErrorResult.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'engine/classes/ErrorResult.php') diff --git a/engine/classes/ErrorResult.php b/engine/classes/ErrorResult.php index 739101dbb..8dbb7c13f 100644 --- a/engine/classes/ErrorResult.php +++ b/engine/classes/ErrorResult.php @@ -3,8 +3,8 @@ * ErrorResult * The error result class. * - * @package Elgg - * @subpackage Core + * @package Elgg.Core + * @subpackage WebServicesAPI */ class ErrorResult extends GenericResult { // Fail with no specific code @@ -17,12 +17,21 @@ class ErrorResult extends GenericResult { // Invalid, expired or missing auth token public static $RESULT_FAIL_AUTHTOKEN = -20; + /** + * A new error result + * + * @param string $message Message + * @param int $code Error Code + * @param Exception $exception Exception object + * + * @return void + */ public function ErrorResult($message, $code = "", Exception $exception = NULL) { if ($code == "") { $code = ErrorResult::$RESULT_FAIL; } - if ($exception!=NULL) { + if ($exception != NULL) { $this->setResult($exception->__toString()); } @@ -32,9 +41,11 @@ class ErrorResult extends GenericResult { /** * Get a new instance of the ErrorResult. * - * @param string $message - * @param int $code + * @param string $message Message + * @param int $code Code * @param Exception $exception Optional exception for generating a stack trace. + * + * @return ErrorResult */ public static function getInstance($message, $code = "", Exception $exception = NULL) { // Return a new error object. -- cgit v1.2.3