mirror of
https://github.com/danog/telegram-entities.git
synced 2024-11-30 04:39:06 +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) {
|
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>',
|
||||||
|
Loading…
Reference in New Issue
Block a user