Skip to content

Commit

Permalink
Fixed Psalm PossiblyInvalidCast, PossiblyInvalidArgument (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmetDenis authored Aug 3, 2023
1 parent 8ae6ec9 commit 2e8f4f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function text(float $value, string $rule, bool $showSymbol = true): strin
$result = \str_replace(
['%v', '%s'],
[$data['value'], $symbol],
$data['template'],
(string)$data['template'],
);

return \trim($result);
Expand All @@ -89,7 +89,7 @@ public function html(array $current, array $orig, array $params): string
"<span class=\"simpleType-value\">{$data['value']}</span>",
"<span class=\"simpleType-symbol\">{$rData['symbol']}</span>",
],
$data['template'],
(string)$data['template'],
);

return '<span ' . self::htmlAttributes([
Expand Down

0 comments on commit 2e8f4f1

Please sign in to comment.