8000 [Debug] added some missing phpdocs · symfony/symfony@80e19e2 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80e19e2

Browse files
committed
[Debug] added some missing phpdocs
1 parent 968764b commit 80e19e2

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\Debug\Exception\FatalErrorException;
1717
use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
1818
use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
19+
use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
1920

2021
/**
2122
* ErrorHandler.
@@ -57,7 +58,7 @@ class ErrorHandler
5758
/**
5859
* Registers the error handler.
5960
*
60-
* @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
61+
* @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
6162
* @param Boolean $displayErrors Display errors (for dev environment) or just log they (production usage)
6263
*
6364
* @return The registered error handler
@@ -76,16 +77,32 @@ public static function register($level = null, $displayErrors = true)
7677
return $handler;
7778
}
7879

80+
/**
81+
* Sets the level at which the conversion to Exception is done.
82+
*
83+
* @param integer|null $level The level (null to use the error_reporting() value and 0 to disable)
84+
*/
7985
public function setLevel($level)
8086
{
8187
$this->level = null === $level ? error_reporting() : $level;
8288
}
8389

90+
/**
91+
* Sets the display_errors flag value.
92+
*
93+
* @param integer $displayErrors The display_errors flag value
94+
*/
8495
public function setDisplayErrors($displayErrors)
8596
{
8697
$this->displayErrors = $displayErrors;
8798
}
8899

100+
/**
101+
* Sets a logger for the given channel.
102+
*
103+
* @param LoggerInterface $logger A logger interface
104+
* @param string $channel The channel associated with the logger (deprecation or emergency)
105+
*/
89106
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
90107
{
91108
self::$loggers[$channel] = $logger;
@@ -163,7 +180,14 @@ public function handleFatal()
163180
}
164181
}
165182

166-
public function getFatalErrorHandlers()
183+
/**
184+
* Gets the fatal error handlers.
185+
*
186+
* Override this method if you want to define more fatal error handlers.
187+
*
188+
* @return FatalErrorHandlerInterface[] An array of FatalErrorHandlerInterface
189+
*/
190+
protected function getFatalErrorHandlers()
167191
{
168192
return array(
169193
new UndefinedFunctionFatalErrorHandler(),

0 commit comments

Comments
 (0)
0