Every PHP file in my project can be fixed, except the one below and I can't figure out why.
C:\Users\Sennewood\AppData\Roaming\Composer\vendor\bin>php-cs-fixer.bat fix --path-mode=intersection C:\Dev\XAMPP\htdocs\project\file.php --verbose --config=C:\Dev\XAMPP\htdocs\project\.php_cs
Loaded config default from "C:\Dev\XAMPP\htdocs\project\.php_cs".
Using cache file ".php_cs.cache".
F
Legend: ?-unknown, I-invalid file syntax, file ignored, S-Skipped, .-no changes, F-fixed, E-error
1) C:\Dev\XAMPP\htdocs\project\file.php (no_trailing_whitespace, braces)
Fixed all files in 0.250 seconds, 8.000 MB memory used
$ php -v):=> 7.1.6 (via XAMPP, 32-bit)
$ php-cs-fixer -V):=> PHP CS Fixer 2.11.1 Grey Devil
=> php-cs-fixer.bat fix --path-mode=intersection C:Dev\XAMPP\htdocs\project\file.php --verbose --config=C:Dev\XAMPP\htdocs\project.php_cs
return PhpCsFixer\Config::create()
->setLineEnding("\r\n")
->setRules([
'@Symfony' => true,
'array_indentation' => true,
'array_syntax' => true,
'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
'class_definition' => ['multiLineExtendsEachSingleLine' => false, 'singleItemSingleLine' => true, 'singleLine' => true],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'none'],
'declare_equal_normalize' => ['space' => 'single'],
'increment_style' => false,
'linebreak_after_opening_tag' => true,
'method_argument_space' => ['ensure_fully_multiline' => true, 'keep_multiple_spaces_after_comma' => false],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_alternative_syntax' => true,
'no_blank_lines_after_class_opening' => false,
'no_null_property_initialization' => true,
'no_short_echo_tag' => true,
'ordered_class_elements' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['importsOrder' => null],
])
->setFinder(PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)
;
<?php
class NavigationDropdown extends Navigation {
private $elements;
public function __construct($position, $text, $acl, $disabled) {
$this->position = $position;
$this->acl = $acl;
$this->disabled = $disabled;
$this->text = $this->setText($text);
$this->elements = array();
}
public function addElement($text, $acl, $module, $action) {
$this->elements[$text] = array(
"name" => $text,
"text" => $this->setText($text),
"acl" => $acl,
"url" => $this->makeURL($module, $action),
"module" => $module,
"action" => $action);
}
public function getAllElements() {
return $this->elements;
}
public function getElementName($element) {
return $this->elements[$element]['name'];
}
public function getElementURL($element) {
return $this->elements[$element]['url'];
}
public function getElementText($element) {
return $this->elements[$element]['text'];
}
public function getElementACL($element) {
return $this->elements[$element]['acl']
}
}
Hi and thanks for stopping by :)
In your sample:
public function getElementACL($element) {
return $this->elements[$element]['acl']
}
there is a ; missing for the return statement. This makes the linter fail and as such the fixer will not attempted to fix it.
Let me know if this solves your issue.

That was the reason; thank you :)
you're welcome, happy to hear it is resolved :)
and happy to see Jean-Luc :D