From 2d5c7e9d3e624aae80b69a3a66fe00c9e7bca8f1 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 22 Apr 2024 17:32:03 +0200 Subject: [PATCH] Fix psalm --- src/Entities.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Entities.php b/src/Entities.php index c841bc2..00f8ac6 100644 --- a/src/Entities.php +++ b/src/Entities.php @@ -370,7 +370,7 @@ final class Entities foreach ($this->entities as $entity) { ['offset' => $offset, 'length' => $length] = $entity; $insertions[$offset] ??= ''; - /** @psalm-suppress PossiblyUndefinedArrayOffset */ + /** @psalm-suppress PossiblyUndefinedArrayOffset, DocblockTypeContradiction */ $insertions[$offset] .= match ($entity['type']) { 'bold' => '', 'italic' => '', @@ -390,6 +390,7 @@ final class Entities default => '', }; $offset += $length; + /** @psalm-suppress DocblockTypeContradiction */ $insertions[$offset] = match ($entity['type']) { "bold" => '', "italic" => '',