1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 09:36:11 +02:00

Fix CS and add chainability to a few more setter methods, refs #221

This commit is contained in:
Jordi Boggiano
2013-08-09 14:12:38 +02:00
parent 07868bfc7e
commit 7a8844d4db
4 changed files with 21 additions and 11 deletions

View File

@@ -77,6 +77,8 @@ abstract class AbstractHandler implements HandlerInterface
throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');
}
array_unshift($this->processors, $callback);
return $this;
}
/**
@@ -97,7 +99,7 @@ abstract class AbstractHandler implements HandlerInterface
public function setFormatter(FormatterInterface $formatter)
{
$this->formatter = $formatter;
return $this;
}
@@ -116,11 +118,14 @@ abstract class AbstractHandler implements HandlerInterface
/**
* Sets minimum logging level at which this handler will be triggered.
*
* @param integer $level
* @param integer $level
* @return self
*/
public function setLevel($level)
{
$this->level = $level;
return $this;
}
/**
@@ -138,10 +143,13 @@ abstract class AbstractHandler implements HandlerInterface
*
* @param Boolean $bubble True means that bubbling is not permitted.
* False means that this handler allows bubbling.
* @return self
*/
public function setBubble($bubble)
{
$this->bubble = $bubble;
return $this;
}
/**