1
0
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:
Jordi Boggiano
2016-03-01 17:35:54 +00:00
parent ba995ffd1e
commit 3d30ba5ecc
26 changed files with 89 additions and 87 deletions

View File

@@ -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.');