Skip to content

Commit 1595a70

Browse files
committed
Fixup static analysis issues
1 parent a578148 commit 1595a70

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/CliRenderer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public function renderInline(AbstractInline $inline): string
8383
*/
8484
public function renderInlines(iterable $inlines): string
8585
{
86+
$inlines = is_array($inlines) ? $inlines : iterator_to_array($inlines);
87+
8688
return implode(
8789
"",
8890
array_map(
@@ -117,6 +119,8 @@ public function renderBlock(AbstractBlock $block, bool $inTightList = false): st
117119
*/
118120
public function renderBlocks(iterable $blocks, bool $inTightList = false): string
119121
{
122+
$blocks = is_array($blocks) ? $blocks : iterator_to_array($blocks);
123+
120124
return implode(
121125
"\n",
122126
array_map(

src/CliRendererFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
class CliRendererFactory
99
{
10+
/**
11+
* @param array<mixed> $environmentConfig
12+
* @return CliRenderer
13+
*/
1014
public function __invoke(array $environmentConfig = []): CliRenderer
1115
{
1216
$environment = new Environment($environmentConfig);

0 commit comments

Comments
 (0)