Skip to content

Commit a4df205

Browse files
committed
rename
1 parent 8e21cd7 commit a4df205

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Logs/Log.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function setLevel(LogLevel $level): self
8484

8585
public function getPsrLevel(): string
8686
{
87-
return $this->level->asPsrLevel();
87+
return $this->level->toPsrLevel();
8888
}
8989

9090
public function getBody(): string

src/Logs/LogLevel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getPriority(): int
7070
return $this->priority;
7171
}
7272

73-
public function asPsrLevel(): string
73+
public function toPsrLevel(): string
7474
{
7575
switch ($this->value) {
7676
case 'trace':

tests/Logs/LogTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testGettersAndSetters(): void
3838
*/
3939
public function testLogLevelToPsrMapping(LogLevel $logLevel, $expected): void
4040
{
41-
$this->assertSame($expected, $logLevel->asPsrLevel());
41+
$this->assertSame($expected, $logLevel->toPsrLevel());
4242
}
4343

4444
/**
@@ -47,7 +47,7 @@ public function testLogLevelToPsrMapping(LogLevel $logLevel, $expected): void
4747
public function testLogAndLogLevelConsistent(LogLevel $level, $expected): void
4848
{
4949
$log = new Log(1.0, '123', $level, 'foo');
50-
$this->assertSame($expected, $log->getPsrLogLevel());
50+
$this->assertSame($expected, $log->getPsrLevel());
5151
}
5252

5353
public function logLevelDataProvider(): \Generator

0 commit comments

Comments
 (0)