Skip to content

Commit

Permalink
Fix deprecated string variable format
Browse files Browse the repository at this point in the history
  • Loading branch information
zbateson committed Mar 2, 2024
1 parent d270120 commit 089ac1f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ErrorBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function addError(string $message, string $psrLogLevel, ?Throwable $excep
$this->errors[] = $error;
$this->logger->log(
$psrLogLevel,
'${contextName} ${message} ${exception}',
'{$contextName} {$message} {$exception}',
[
'contextName' => $this->getErrorLoggingContextName(),
'message' => $message,
Expand Down
2 changes: 1 addition & 1 deletion src/Header/HeaderFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function newInstance(string $name, string $value) : IHeader
{
$class = $this->getClassFor($name);
$this->logger->debug(
'Creating ${class} for header with name "${name}" and value "${value}"',
'Creating {$class} for header with name "{$name}" and value "{$value}"',
[ 'class' => $class, 'name' => $name, 'value' => $value ]
);
return $this->newInstanceOf($name, $value, $class);
Expand Down
2 changes: 1 addition & 1 deletion src/Header/Part/DatePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(MbWrapper $charsetConverter, string $token)
$this->date = new DateTime($dateToken);
} catch (Exception $e) {
$this->addError(
"Unable to parse date from header: \"${dateToken}\"",
"Unable to parse date from header: \"{$dateToken}\"",
LogLevel::ERROR,
$e
);
Expand Down
2 changes: 1 addition & 1 deletion tests/MailMimeParser/Header/Part/DatePartTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testInvalidDate() : void

$errs = $part->getErrors(false, LogLevel::ERROR);
$this->assertCount(1, $errs);
$this->assertEquals("Unable to parse date from header: \"${value}\"", $errs[0]->getMessage());
$this->assertEquals("Unable to parse date from header: \"{$value}\"", $errs[0]->getMessage());
$this->assertEquals(LogLevel::ERROR, $errs[0]->getPsrLevel());
}
}

0 comments on commit 089ac1f

Please sign in to comment.