Browse files

better comments

  • Loading branch information...
1 parent 7c2f919 commit 8ee228f6f9c96a342729a38ba267ea093e4a6cd9 @rikh42 committed Feb 25, 2013
Showing with 9 additions and 5 deletions.
  1. +9 −5 errors/ErrorHandler.php
View
14 errors/ErrorHandler.php
@@ -56,12 +56,11 @@ class ErrorHandler
private $level;
private $exceptionHandler;
+
/**
- * Register the error handler.
- *
- * @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
- *
- * @return The registered error handler
+ * @param ExceptionHandler $exceptionHandler
+ * @param null $level - The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
+ * @return ErrorHandler
*/
public static function register(ExceptionHandler $exceptionHandler, $level = null)
{
@@ -75,6 +74,11 @@ public static function register(ExceptionHandler $exceptionHandler, $level = nul
return $handler;
}
+
+ /**
+ * Sets the level at which errors become exceptions
+ * @param $level
+ */
public function setLevel($level)
{
$this->level = null === $level ? error_reporting() : $level;

0 comments on commit 8ee228f

Please sign in to comment.