Skip to content

Syntax error when using PHPCBF on alternative style foreach loops #772

@adduc

Description

@adduc

When running phpcbf with the PSR2 standard against the following code, a closing PHP tag is omitted from output (second line).

Original file:

<?php foreach($formset['Fieldset'] as $fieldset): ?> <?php foreach($fieldset['Field'] as $field): ?> <?php endforeach; ?> <?php endforeach; ?> 

Actual output:

<?php foreach ($formset['Fieldset'] as $fieldset) : ?> <?php foreach ($fieldset['Field'] as $field) : <?php endforeach; ?> <?php endforeach;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions