Skip to content

Commit

Permalink
Fix up psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Mar 2, 2024
1 parent 1ff5ec3 commit cea4563
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
<NullArgument>
<code><![CDATA[$this->emailLog]]></code>
</NullArgument>
<PropertyTypeCoercion>
<code>new $className($config)</code>
</PropertyTypeCoercion>
</file>
<file src="src/Model/Table/LazyTableTrait.php">
<RiskyTruthyFalsyComparison>
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/MailPreviewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ protected function findPreview(string $previewName, string $emailName, string $p
$mailPreview = new $realClass();

$email = $mailPreview->find($emailName);
if (!$email) {
if ($email === null) {
throw new NotFoundException(sprintf(
'Mailer preview %s::%s not found',
'Mailer preview `%s::%s` not found',

Check warning on line 286 in src/Controller/MailPreviewController.php

View check run for this annotation

Codecov / codecov/patch

src/Controller/MailPreviewController.php#L286

Added line #L286 was not covered by tests
$previewName,
$emailName
));
Expand Down
1 change: 1 addition & 0 deletions src/DebugInclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public function __construct()
*/
public function includePaths(): array
{
/** @psalm-suppress RedundantCast */
$paths = explode(PATH_SEPARATOR, (string)get_include_path());
$paths = array_filter($paths, function ($path) {
if ($path === '.' || strlen($path) === 0) {
Expand Down
1 change: 1 addition & 0 deletions src/Mailer/Transport/DebugKitTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran

if ($className) {
unset($config['originalClassName'], $config['debugKitLog']);
/** @psalm-suppress UnsafeInstantiation */
$this->originalTransport = new $className($config);
}
}
Expand Down

0 comments on commit cea4563

Please sign in to comment.