mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 10:06:08 +02:00
Add some return type hints and fix up HandlerWrapper
This commit is contained in:
@@ -28,7 +28,7 @@ trait ProcessableHandlerTrait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pushProcessor(callable $callback)
|
||||
public function pushProcessor(callable $callback): HandlerInterface
|
||||
{
|
||||
if (!is_callable($callback)) {
|
||||
throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');
|
||||
@@ -41,7 +41,7 @@ trait ProcessableHandlerTrait
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function popProcessor()
|
||||
public function popProcessor(): callable
|
||||
{
|
||||
if (!$this->processors) {
|
||||
throw new \LogicException('You tried to pop from an empty processor stack.');
|
||||
|
||||
Reference in New Issue
Block a user