Fix psalm

This commit is contained in:
Daniil Gentili 2024-04-22 17:32:03 +02:00
parent 78773a4e60
commit 2d5c7e9d3e

View File

@ -370,7 +370,7 @@ final class Entities
foreach ($this->entities as $entity) { foreach ($this->entities as $entity) {
['offset' => $offset, 'length' => $length] = $entity; ['offset' => $offset, 'length' => $length] = $entity;
$insertions[$offset] ??= ''; $insertions[$offset] ??= '';
/** @psalm-suppress PossiblyUndefinedArrayOffset */ /** @psalm-suppress PossiblyUndefinedArrayOffset, DocblockTypeContradiction */
$insertions[$offset] .= match ($entity['type']) { $insertions[$offset] .= match ($entity['type']) {
'bold' => '<b>', 'bold' => '<b>',
'italic' => '<i>', 'italic' => '<i>',
@ -390,6 +390,7 @@ final class Entities
default => '', default => '',
}; };
$offset += $length; $offset += $length;
/** @psalm-suppress DocblockTypeContradiction */
$insertions[$offset] = match ($entity['type']) { $insertions[$offset] = match ($entity['type']) {
"bold" => '</b>', "bold" => '</b>',
"italic" => '</i>', "italic" => '</i>',