Skip to content

Commit cea4563

Browse files
committed
Fix up psalm
1 parent 1ff5ec3 commit cea4563

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

psalm-baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@
6868
<NullArgument>
6969
<code><![CDATA[$this->emailLog]]></code>
7070
</NullArgument>
71-
<PropertyTypeCoercion>
72-
<code>new $className($config)</code>
73-
</PropertyTypeCoercion>
7471
</file>
7572
<file src="src/Model/Table/LazyTableTrait.php">
7673
<RiskyTruthyFalsyComparison>

src/Controller/MailPreviewController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ protected function findPreview(string $previewName, string $emailName, string $p
281281
$mailPreview = new $realClass();
282282

283283
$email = $mailPreview->find($emailName);
284-
if (!$email) {
284+
if ($email === null) {
285285
throw new NotFoundException(sprintf(
286-
'Mailer preview %s::%s not found',
286+
'Mailer preview `%s::%s` not found',
287287
$previewName,
288288
$emailName
289289
));

src/DebugInclude.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public function __construct()
8282
*/
8383
public function includePaths(): array
8484
{
85+
/** @psalm-suppress RedundantCast */
8586
$paths = explode(PATH_SEPARATOR, (string)get_include_path());
8687
$paths = array_filter($paths, function ($path) {
8788
if ($path === '.' || strlen($path) === 0) {

src/Mailer/Transport/DebugKitTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran
5757

5858
if ($className) {
5959
unset($config['originalClassName'], $config['debugKitLog']);
60+
/** @psalm-suppress UnsafeInstantiation */
6061
$this->originalTransport = new $className($config);
6162
}
6263
}

0 commit comments

Comments
 (0)