diff options
author | Tomas V.V.Cox <cox@php.net> | 2004-06-21 04:06:18 +0000 |
---|---|---|
committer | Tomas V.V.Cox <cox@php.net> | 2004-06-21 04:06:18 +0000 |
commit | 24ec6e5a5ce2a03b7ee1a0f812b9c1b3bd9b7660 (patch) | |
tree | ca08170501596572f2d0b6f5900fa07603d9316a /pear | |
parent | 8957eac122d29965c71b29f41b8db2005690a843 (diff) | |
download | php-git-24ec6e5a5ce2a03b7ee1a0f812b9c1b3bd9b7660.tar.gz |
Be more consistent with CS
Diffstat (limited to 'pear')
-rw-r--r-- | pear/PEAR/Exception.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/pear/PEAR/Exception.php b/pear/PEAR/Exception.php index d5ef4464eb..be6d573201 100644 --- a/pear/PEAR/Exception.php +++ b/pear/PEAR/Exception.php @@ -15,6 +15,7 @@ // +----------------------------------------------------------------------+ // | Authors: Tomas V.V.Cox <cox@idecnet.com> | // | Hans Lellelid <hans@velum.net> | +// | | // +----------------------------------------------------------------------+ // // $Id$ @@ -95,7 +96,7 @@ class PEAR_Exception extends Exception protected $error_class; protected $error_method; - private $method; + private $_method; private static $_observers = array(); /** @@ -121,16 +122,16 @@ class PEAR_Exception extends Exception $trace = parent::getTrace(); $this->error_class = $trace[0]['class']; $this->error_method = $trace[0]['function']; - $this->method = $this->error_class.'::'.$this->error_method.'()'; + $this->_method = $this->error_class . '::' . $this->error_method . '()'; parent::__construct($message, $code); $this->_signal(); } /** - * @param mixed $callback - A valid php callback, see php_func is_callable() + * @param mixed $callback - A valid php callback, see php func is_callable() * - A PEAR_OBSERVER_* constant - * - An array(const PEAR_OBSERVER_*,mixed $options) + * - An array(const PEAR_OBSERVER_*, mixed $options) * * @param string $label - The name of the observer. Use this if you want * to remove it later with delObserver() @@ -175,9 +176,9 @@ class PEAR_Exception extends Exception private function _getCauseMessage() { - $msg = ' ' . $this->method . " at {$this->file} ({$this->line})\n"; + $msg = ' ' . $this->_method . " at {$this->file} ({$this->line})\n"; if ($this->cause instanceof Exception) { - return $msg.$this->cause->_getCauseMessage(); + return $msg . $this->cause->_getCauseMessage(); } return $msg; } @@ -203,12 +204,12 @@ class PEAR_Exception extends Exception public function __toString() { $str = get_class($this) . " occurred: \n" . - ' Error message: ' . $this->message . "\n" . - ' Error code : ' . $this->code . "\n" . - ' File (Line) : ' . "{$this->file} ({$this->line})\n" . - ' Method : ' . $this->method . "\n"; + " Error message: {$this->message}\n" . + " Error code : {$this->code}\n" . + " File (Line) : {$this->file} ({$this->line})\n" . + " Method : {$this->_method}\n"; if ($this->cause instanceof Exception) { - $str .= " Nested Error : \n".$this->_getCauseMessage(); + $str .= " Nested Error :\n" . $this->_getCauseMessage(); } if (isset($_SERVER['REQUEST_URI'])) { return nl2br('<pre>'.htmlentities($str).'</pre>'); |