Skip to content

Commit

Permalink
Change sprintf template to avoid using string concat for parameter
Browse files Browse the repository at this point in the history
Still not perfect: Either infection or psalm is unhappy. Works though ;)
  • Loading branch information
theseer committed Aug 12, 2023
1 parent e6f212c commit e9ca22b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/viewmodel/ViewModelRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,10 @@ private function iterableApply(DOMElement $context, iterable $list): void {

throw new ViewModelRendererException(
sprintf(
'Unsupported type "%s" in list (%s)',
'Unsupported type "%s" in list (%s[%d])',
gettype($model),
$this->getModelPath($context) . '[' . (string)$pos . ']'
$this->getModelPath($context),
$pos
),
ViewModelRendererException::UnsupportedTypeForProperty
);
Expand Down

0 comments on commit e9ca22b

Please sign in to comment.