mirror of
https://github.com/danog/telegram-entities.git
synced 2024-11-26 12:14:44 +01:00
Fix psalm
This commit is contained in:
parent
78773a4e60
commit
2d5c7e9d3e
@ -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' => '<b>',
|
||||
'italic' => '<i>',
|
||||
@ -390,6 +390,7 @@ final class Entities
|
||||
default => '',
|
||||
};
|
||||
$offset += $length;
|
||||
/** @psalm-suppress DocblockTypeContradiction */
|
||||
$insertions[$offset] = match ($entity['type']) {
|
||||
"bold" => '</b>',
|
||||
"italic" => '</i>',
|
||||
|
Loading…
Reference in New Issue
Block a user