minor #33633 [TwigBridge] Fix undefined constant and other minor issues (yceruto)
This PR was merged into the 4.4 branch.
Discussion
----------
[TwigBridge] Fix undefined constant and other minor issues
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
/cc @fabpot
Commits
-------
e9e004e
Fix undefined constant and other minor issues
This commit is contained in:
commit
85d10114e0
@ -89,7 +89,7 @@ class NotificationEmail extends TemplatedEmail
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return self
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function importance(string $importance)
|
public function importance(string $importance)
|
||||||
{
|
{
|
||||||
@ -99,7 +99,7 @@ class NotificationEmail extends TemplatedEmail
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Throwable|FlattenException
|
* @param \Throwable|FlattenException $exception
|
||||||
*
|
*
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
@ -155,7 +155,7 @@ class NotificationEmail extends TemplatedEmail
|
|||||||
{
|
{
|
||||||
$headers = parent::getPreparedHeaders();
|
$headers = parent::getPreparedHeaders();
|
||||||
|
|
||||||
$importance = $this->context['importance'] ?? IMPORTANCE_LOW;
|
$importance = $this->context['importance'] ?? self::IMPORTANCE_LOW;
|
||||||
$this->priority($this->determinePriority($importance));
|
$this->priority($this->determinePriority($importance));
|
||||||
$headers->setHeaderBody('Text', 'Subject', sprintf('[%s] %s', strtoupper($importance), $this->getSubject()));
|
$headers->setHeaderBody('Text', 'Subject', sprintf('[%s] %s', strtoupper($importance), $this->getSubject()));
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ class NotificationEmail extends TemplatedEmail
|
|||||||
}
|
}
|
||||||
|
|
||||||
$message = \get_class($exception);
|
$message = \get_class($exception);
|
||||||
if ('' != $exception->getMessage()) {
|
if ('' !== $exception->getMessage()) {
|
||||||
$message .= ': '.$exception->getMessage();
|
$message .= ': '.$exception->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user