| Conditions | 4 | 
| Paths | 5 | 
| Total Lines | 20 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 29 | public function resolve(Template $template, array $context, array $blocks) | ||
| 30 |     { | ||
| 31 | $templateName = $template->getTemplateName(); | ||
| 32 |         if (empty($this->blocks[$templateName])) { | ||
| 33 | return; | ||
| 34 | } | ||
| 35 | |||
| 36 |         while ($blockName = array_pop($this->blocks[$templateName])) { | ||
| 37 | $buffer = ob_get_clean(); | ||
| 38 | |||
| 39 | $blocks[$blockName] = [$template, 'block_'.$blockName.'_deferred']; | ||
| 40 | $template->displayBlock($blockName, $context, $blocks); | ||
| 41 | |||
| 42 | echo $buffer; | ||
| 43 | } | ||
| 44 | |||
| 45 |         if ($parent = $template->getParent($context)) { | ||
| 46 | $this->resolve($parent, $context, $blocks); | ||
|  | |||
| 47 | } | ||
| 48 | } | ||
| 49 | } | ||
| 50 | 
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.