Alpine418
Alpine418

Reputation: 141

Need to know PHP CS Fixer rule

I'm using PHP CS Fixer for my code. But I am also using PHP as template engine and want one liner PHP code.

When I write this:

<!-- some html code -->
<?php foreach ($modules as $module) { ?>
<!-- some html code ->

...then I get this after the PHP CS Fixer is done:

<!-- some html code -->
<?php foreach ($modules as $module) {

?>
<!-- some html code -->

Which PHP CS rule is affected and can I disable to prevent this code formatting behaviour?

Upvotes: 1

Views: 861

Answers (1)

Alpine418
Alpine418

Reputation: 141

Found the solution by myself. It was the braces [@PSR2, @Symfony] rule.

The --verbose option and the --dry-run flag helped me a lot. Read the PHP CS Fixer manual for more information.

Upvotes: 2

Related Questions