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

Add a lot more scalar types and go strict in Logger

This commit is contained in:
Jordi Boggiano
2015-12-18 17:47:20 +00:00
parent c9aa0368bf
commit 6c424f851c
15 changed files with 67 additions and 75 deletions

View File

@@ -36,7 +36,7 @@ abstract class AbstractHandler extends Handler
/**
* {@inheritdoc}
*/
public function isHandling(array $record)
public function isHandling(array $record): bool
{
return $record['level'] >= $this->level;
}
@@ -47,7 +47,7 @@ abstract class AbstractHandler extends Handler
* @param int|string $level Level or level name
* @return self
*/
public function setLevel($level)
public function setLevel($level): self
{
$this->level = Logger::toMonologLevel($level);
@@ -59,7 +59,7 @@ abstract class AbstractHandler extends Handler
*
* @return int
*/
public function getLevel()
public function getLevel(): int
{
return $this->level;
}
@@ -71,7 +71,7 @@ abstract class AbstractHandler extends Handler
* false means that bubbling is not permitted.
* @return self
*/
public function setBubble($bubble)
public function setBubble(bool $bubble): self
{
$this->bubble = $bubble;
@@ -84,7 +84,7 @@ abstract class AbstractHandler extends Handler
* @return Boolean true means that this handler allows bubbling.
* false means that bubbling is not permitted.
*/
public function getBubble()
public function getBubble(): bool
{
return $this->bubble;
}