We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yoda_style
require
require is included in ternary test
php-cs-fixer fix scr/test.php --using-cache=no --rules=@Symfony -vvv PHP CS Fixer 3.26.0 Crank Cake by Fabien Potencier and Dariusz Ruminski. PHP runtime: 8.2.6 Loaded config default. F 1 / 1 (100%) Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error 1) scr/test.php (elseif, single_space_around_construct, no_unneeded_control_parentheses, increment_style, single_quote, no_useless_concat_operator, spaces_inside_parentheses, array_syntax, single_line_comment_spacing, blank_line_after_opening_tag, concat_space, no_singleline_whitespace_before_semicolons, no_spaces_around_offset, yoda_style, control_structure_continuation_position, no_trailing_whitespace, curly_braces_position, statement_indentation, cast_spaces, no_whitespace_in_blank_line, no_extra_blank_lines, binary_operator_spaces) Fixed 1 of 1 files in 0.106 seconds, 6.000 MB memory used
<?php $finder = PhpCsFixer\Finder::create() ->in(__DIR__) ->exclude('somedir') ; $config = new PhpCsFixer\Config(); return $config->setRules([ '@Symfony' => true, ]) ->setFinder($finder) ;
require $var == "false" ? "../scr/file.php" : "../scr/other_file.php";
is transformed to
'false' == require $var ? '../scr/file.php' : '../scr/other_file.php';
require 'false' == $var ? '../scr/file.php' : '../scr/other_file.php';
The text was updated successfully, but these errors were encountered:
YodaStyleFixer
require(_once)
include(_once)
yield from
Successfully merging a pull request may close this issue.
Bug report
Description
require is included in ternary test
Used command
php-cs-fixer fix scr/test.php --using-cache=no --rules=@Symfony -vvv PHP CS Fixer 3.26.0 Crank Cake by Fabien Potencier and Dariusz Ruminski. PHP runtime: 8.2.6 Loaded config default. F 1 / 1 (100%) Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error 1) scr/test.php (elseif, single_space_around_construct, no_unneeded_control_parentheses, increment_style, single_quote, no_useless_concat_operator, spaces_inside_parentheses, array_syntax, single_line_comment_spacing, blank_line_after_opening_tag, concat_space, no_singleline_whitespace_before_semicolons, no_spaces_around_offset, yoda_style, control_structure_continuation_position, no_trailing_whitespace, curly_braces_position, statement_indentation, cast_spaces, no_whitespace_in_blank_line, no_extra_blank_lines, binary_operator_spaces) Fixed 1 of 1 files in 0.106 seconds, 6.000 MB memory used
Configuration file
Code snippet that reproduces the problem
is transformed to
Expected result
The text was updated successfully, but these errors were encountered: