Skip to content

Commit

Permalink
chore: clean code up
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Sep 17, 2022
1 parent 1f49e9c commit 7cf0be0
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,26 @@
class Log
{
const EMERGENCY = 1;
const ALERT = 2;
const CRITICAL = 3;
const ERROR = 4;
const WARN = 5;
const NOTICE = 6;
const INFO = 7;
const DEBUG = 8;
const ALERT = 2;
const CRITICAL = 3;
const ERROR = 4;
const WARN = 5;
const NOTICE = 6;
const INFO = 7;
const DEBUG = 8;

/**
* @var array
*/
protected static $levels = [
self::EMERGENCY => 'EMERGENCY',
self::ALERT => 'ALERT',
self::CRITICAL => 'CRITICAL',
self::ERROR => 'ERROR',
self::WARN => 'WARNING',
self::NOTICE => 'NOTICE',
self::INFO => 'INFO',
self::DEBUG => 'DEBUG'
self::ALERT => 'ALERT',
self::CRITICAL => 'CRITICAL',
self::ERROR => 'ERROR',
self::WARN => 'WARNING',
self::NOTICE => 'NOTICE',
self::INFO => 'INFO',
self::DEBUG => 'DEBUG',
];

/**
Expand All @@ -70,7 +70,7 @@ class Log

/**
* Constructor
*
*
* @param mixed $writer
*/
public function __construct($writer)
Expand All @@ -82,7 +82,7 @@ public function __construct($writer)

/**
* Enable or disable logging/return logging state
*
*
* @param bool|null $enabled Whether to enable or disable logging
* @return bool|void
*/
Expand All @@ -97,7 +97,7 @@ public function enabled(?bool $enabled = null)

/**
* Get/Set log level
*
*
* @param int|null $level The log level
*/
public function level(?int $level = null)
Expand All @@ -115,7 +115,7 @@ public function level(?int $level = null)

/**
* Get/Set log level
*
*
* @param int|null $level The log level
*/
public static function getLevel(int $level)
Expand All @@ -125,7 +125,7 @@ public static function getLevel(int $level)

/**
* Get/Set log writer
*
*
* @param mixed $writer
*/
public function writer($writer = null)
Expand All @@ -141,7 +141,7 @@ public function writer($writer = null)
* Is logging enabled?
* @return bool
*/
public function isEnabled(): bool
public function isEnabled()
{
return $this->enabled;
}
Expand Down Expand Up @@ -239,7 +239,7 @@ public function emergency($object, array $context = [])
* @param mixed $level
* @param mixed $object
* @param array $context
*
*
* @return mixed|bool What the Logger returns, or false if Logger not set or not enabled
* @throws \InvalidArgumentException If invalid log level
*/
Expand Down Expand Up @@ -275,7 +275,7 @@ public function log($level, $object, array $context = [])
* @param array $context An array of placeholder values
* @return string The processed string
*/
protected function interpolate($message, array $context = []): string
protected function interpolate($message, array $context = [])
{
$replace = [];

Expand Down

0 comments on commit 7cf0be0

Please sign in to comment.