| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | protected $options; | 
| 19 | 19 | |
| 20 | 20 | public function __construct( | 
| 21 | - array $options = [Dumper::DEPTH => 8, Dumper::TRUNCATE => 512] | |
| 21 | + array $options = [Dumper::DEPTH => 8, Dumper::TRUNCATE => 512] | |
| 22 | 22 |      ) { | 
| 23 | 23 | $this->options = $options; | 
| 24 | 24 | } | 
| @@ -20,9 +20,9 @@ | ||
| 20 | 20 | public static function create($level, array $levels) | 
| 21 | 21 |      { | 
| 22 | 22 | $message = sprintf( | 
| 23 | - 'Level "%s" is not defined, use one of: "%s"', | |
| 24 | - $level, | |
| 25 | -          implode('", "', array_keys($levels)) | |
| 23 | + 'Level "%s" is not defined, use one of: "%s"', | |
| 24 | + $level, | |
| 25 | +            implode('", "', array_keys($levels)) | |
| 26 | 26 | ); | 
| 27 | 27 | |
| 28 | 28 | return new static($message); | 
| @@ -39,10 +39,10 @@ | ||
| 39 | 39 | * @param array $context | 
| 40 | 40 | */ | 
| 41 | 41 | public function __construct( | 
| 42 | - \DateTime $datetime, | |
| 43 | - $message, | |
| 44 | - $level, | |
| 45 | - array $context | |
| 42 | + \DateTime $datetime, | |
| 43 | + $message, | |
| 44 | + $level, | |
| 45 | + array $context | |
| 46 | 46 |      ) { | 
| 47 | 47 | $this->datetime = $datetime; | 
| 48 | 48 | $this->message = (string)$message; | 
| @@ -45,8 +45,8 @@ | ||
| 45 | 45 | array $context | 
| 46 | 46 |      ) { | 
| 47 | 47 | $this->datetime = $datetime; | 
| 48 | - $this->message = (string)$message; | |
| 49 | - $this->level = (string)$level; | |
| 48 | + $this->message = (string) $message; | |
| 49 | + $this->level = (string) $level; | |
| 50 | 50 | $this->context = $context; | 
| 51 | 51 | } | 
| 52 | 52 | |
| @@ -29,7 +29,7 @@ discard block | ||
| 29 | 29 | * @var array $levels Logging levels | 
| 30 | 30 | */ | 
| 31 | 31 | protected static $levels = [ | 
| 32 | - self::WORKFLOW => 'WORKFLOW', | |
| 32 | + self::WORKFLOW => 'WORKFLOW', | |
| 33 | 33 | ]; | 
| 34 | 34 | |
| 35 | 35 | /** | 
| @@ -46,10 +46,10 @@ discard block | ||
| 46 | 46 | * @param array $processors | 
| 47 | 47 | */ | 
| 48 | 48 | public function __construct( | 
| 49 | - $name, | |
| 50 | - FormatterInterface $formatter, | |
| 51 | - $handlers = [], | |
| 52 | - $processors = [] | |
| 49 | + $name, | |
| 50 | + FormatterInterface $formatter, | |
| 51 | + $handlers = [], | |
| 52 | + $processors = [] | |
| 53 | 53 |      ) { | 
| 54 | 54 | parent::__construct($name, $handlers, $processors); | 
| 55 | 55 | static::$levels += parent::$levels; | 
| @@ -62,10 +62,10 @@ discard block | ||
| 62 | 62 | protected function createWorkflow() | 
| 63 | 63 |      { | 
| 64 | 64 | return new Workflow( | 
| 65 | - $this, | |
| 66 | - $this->workflowFormatter, | |
| 67 | - $this->getDateTimeZone(), | |
| 68 | - static::WORKFLOW | |
| 65 | + $this, | |
| 66 | + $this->workflowFormatter, | |
| 67 | + $this->getDateTimeZone(), | |
| 68 | + static::WORKFLOW | |
| 69 | 69 | ); | 
| 70 | 70 | } | 
| 71 | 71 | |
| @@ -36,25 +36,25 @@ | ||
| 36 | 36 | } | 
| 37 | 37 | |
| 38 | 38 | return strtr( | 
| 39 | - static::CONTEXT_FORMAT, | |
| 40 | - [ | |
| 39 | + static::CONTEXT_FORMAT, | |
| 40 | + [ | |
| 41 | 41 | '%context%' => $this->dumper->dump($context), | 
| 42 | - ] | |
| 42 | + ] | |
| 43 | 43 | ); | 
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | public function format(Record $record) | 
| 47 | 47 |      { | 
| 48 | 48 | $string = strtr( | 
| 49 | - static::FORMAT, | |
| 50 | - [ | |
| 49 | + static::FORMAT, | |
| 50 | + [ | |
| 51 | 51 | '%datetime%' => $record->getDatetime()->format( | 
| 52 | - static::DATETIME_FORMAT | |
| 52 | + static::DATETIME_FORMAT | |
| 53 | 53 | ), | 
| 54 | 54 | '%level%' => $record->getLevel(), | 
| 55 | 55 | '%message%' => $record->getMessage(), | 
| 56 | 56 | '%contextPlaceholder%' => $this->prepareContextPart($record), | 
| 57 | - ] | |
| 57 | + ] | |
| 58 | 58 | ); | 
| 59 | 59 | |
| 60 | 60 | return $string; | 
| @@ -23,8 +23,8 @@ | ||
| 23 | 23 | protected $formatter; | 
| 24 | 24 | |
| 25 | 25 | public function __construct( | 
| 26 | - FormatterInterface $formatter, | |
| 27 | - $newLevel = Logger::DEBUG | |
| 26 | + FormatterInterface $formatter, | |
| 27 | + $newLevel = Logger::DEBUG | |
| 28 | 28 |      ) { | 
| 29 | 29 | $this->formatter = $formatter; | 
| 30 | 30 | $this->newLevel = $newLevel; | 
| @@ -30,14 +30,14 @@ discard block | ||
| 30 | 30 | * @var array|string[] $levels Logging levels | 
| 31 | 31 | */ | 
| 32 | 32 | protected static $levels = [ | 
| 33 | - self::DEBUG => 'DEBUG', | |
| 34 | - self::INFO => 'INFO', | |
| 35 | - self::NOTICE => 'NOTICE', | |
| 36 | - self::WARNING => 'WARNING', | |
| 37 | - self::ERROR => 'ERROR', | |
| 38 | - self::CRITICAL => 'CRITICAL', | |
| 39 | - self::ALERT => 'ALERT', | |
| 40 | - self::EMERGENCY => 'EMERGENCY', | |
| 33 | + self::DEBUG => 'DEBUG', | |
| 34 | + self::INFO => 'INFO', | |
| 35 | + self::NOTICE => 'NOTICE', | |
| 36 | + self::WARNING => 'WARNING', | |
| 37 | + self::ERROR => 'ERROR', | |
| 38 | + self::CRITICAL => 'CRITICAL', | |
| 39 | + self::ALERT => 'ALERT', | |
| 40 | + self::EMERGENCY => 'EMERGENCY', | |
| 41 | 41 | ]; | 
| 42 | 42 | |
| 43 | 43 | /** | 
| @@ -79,10 +79,10 @@ discard block | ||
| 79 | 79 | * @param int|string $level Workflow level code | 
| 80 | 80 | */ | 
| 81 | 81 | public function __construct( | 
| 82 | - PsrLoggerInterface $logger, | |
| 83 | - FormatterInterface $formatter, | |
| 84 | - \DateTimeZone $timezone, | |
| 85 | - $level | |
| 82 | + PsrLoggerInterface $logger, | |
| 83 | + FormatterInterface $formatter, | |
| 84 | + \DateTimeZone $timezone, | |
| 85 | + $level | |
| 86 | 86 |      ) { | 
| 87 | 87 | $this->logger = $logger; | 
| 88 | 88 | $this->formatter = $formatter; | 
| @@ -99,9 +99,9 @@ discard block | ||
| 99 | 99 |          if (PHP_VERSION_ID < 70100) { | 
| 100 | 100 |              $microtime = sprintf('%.6F', microtime(true)); | 
| 101 | 101 | $time = \DateTime::createFromFormat( | 
| 102 | - 'U.u', | |
| 103 | - $microtime, | |
| 104 | - $this->timezone | |
| 102 | + 'U.u', | |
| 103 | + $microtime, | |
| 104 | + $this->timezone | |
| 105 | 105 | ); | 
| 106 | 106 | } | 
| 107 | 107 |          else { | 
| @@ -195,10 +195,10 @@ discard block | ||
| 195 | 195 | } | 
| 196 | 196 | |
| 197 | 197 | $this->records[] = new Record( | 
| 198 | - $this->getCurrentDateTime(), | |
| 199 | - $message, | |
| 200 | - $this->getLevelName($level), | |
| 201 | - $context | |
| 198 | + $this->getCurrentDateTime(), | |
| 199 | + $message, | |
| 200 | + $this->getLevelName($level), | |
| 201 | + $context | |
| 202 | 202 | ); | 
| 203 | 203 | } | 
| 204 | 204 | |