Skip to content

Commit 9a5da2c

Browse files
committed
Upgrade coding standard
1 parent 7ddde36 commit 9a5da2c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"require-dev": {
3636
"ext-xdebug": "*",
37-
"aplus/coding-standard": "^2.0",
37+
"aplus/coding-standard": "^2.8",
3838
"ergebnis/composer-normalize": "^2.25",
3939
"jetbrains/phpstorm-attributes": "^1.0",
4040
"phpmd/phpmd": "^2.13",

src/Logger.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ abstract class Logger
3333
* Active log level.
3434
*/
3535
protected LogLevel $level = LogLevel::DEBUG;
36-
protected Log | null $lastLog = null;
36+
protected ?Log $lastLog = null;
3737
protected LogCollector $debugCollector;
3838

3939
/**
4040
* Logger constructor.
4141
*
4242
* @param string $destination
43-
* @param int|LogLevel $level
43+
* @param LogLevel|int $level
4444
* @param array<mixed> $config
4545
*/
4646
public function __construct(
4747
string $destination,
48-
LogLevel|int $level = LogLevel::DEBUG,
48+
LogLevel | int $level = LogLevel::DEBUG,
4949
array $config = []
5050
) {
5151
$this->setDestination($destination);
@@ -86,13 +86,13 @@ protected function getConfig() : array
8686
/**
8787
* Logs with an arbitrary level.
8888
*
89-
* @param int|LogLevel $level
89+
* @param LogLevel|int $level
9090
* @param string $message
9191
* @param array<string> $context
9292
*
9393
* @return bool
9494
*/
95-
public function log(LogLevel|int $level, string $message, array $context = []) : bool
95+
public function log(LogLevel | int $level, string $message, array $context = []) : bool
9696
{
9797
$debug = isset($this->debugCollector);
9898
if ($debug) {
@@ -266,7 +266,7 @@ public function getLevel() : LogLevel
266266
return $this->level;
267267
}
268268

269-
public function setLevel(LogLevel|int $level) : static
269+
public function setLevel(LogLevel | int $level) : static
270270
{
271271
if (\is_int($level)) {
272272
$level = LogLevel::from($level);

0 commit comments

Comments
 (0)