Questions tagged [php-cs-fixer]
87 questions
0
votes
1 answer
PhpStorm and pre-commit hook with PHP-CS-Fixer which modifies number of blank lines in php file
Reproduces on Windows and Mac OS.
In our project we have pre-commit hook which runs PHP-CS-Fixer which modifies number of blank lines between methods in file (reduces from many to one). After that it makes git add to stage that…

Egor Ivanov
- 1
- 2
0
votes
2 answers
Netbeans php-cs-fixer end up with error "Files that were not fixed due to errors reported during linting after fixing:"
I am using php-cs-fixer for code formatting in Netbeans 8.2. When I try to format one file, it shows the error
Files that were not fixed due to errors reported during linting after fixing:
I searched for the fix in many websites, but couldn't get…

Arun
- 3,640
- 7
- 44
- 87
0
votes
0 answers
Php cs fixer. Indentation inside PHP tags
Is there a way to indent the content inside the PHP tags?
from

Jorge Anzola
- 1,165
- 3
- 13
- 33
0
votes
1 answer
Getting Non PHP File Extensions in Symfony Finder / PHP-CS-Fixer
Struggling with adding non php extensions to my finder. Done a long google search but came up blank. Found this but couldn't quite understand: How to use other file extensions in php-cs-fixer, for example .ctp?
This is what I have:

Dayo
- 12,413
- 5
- 52
- 67
0
votes
1 answer
php-cs-fixer including vendor namespaces but not the bundle in src/
Starting with a simple entity class in a symfony 3.4 bundle AppBundle, php-cs-fixer seems to strip imports used by docstrings but ONLY when referring to AppBundle/ – namespaces in vendor/ seem to be safe
Starting with the following, simple entity…

jandom
- 111
- 1
- 7
0
votes
1 answer
php-cs-fixer not working on mac after update
I ran php-cs-fixer self-update on a Mac machine and php-cs-fixer stopped working. No output returned (even with --verbose). Files stay unchanged. I tried reinstalling it (used all possible install options). Tried running with sudo. Still nothing…

Vasily802
- 1,703
- 2
- 18
- 35
0
votes
2 answers
php-cs-fixer [Symfony\Component\Process\Exception\RuntimeException] The process has been signaled with signal "6"
I've installed php-cs-fixer via composer tonight.
But when testing again a php file I'm getting the following error:
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signalled with signal "6".
I've tried removing it…

Benjamin Fox
- 23
- 5
-1
votes
1 answer
PHP CS Fixer Creating Whitespace Between Array Key and Arrow Pointer
Using Laravel, my kernel file has my $routeMiddleware property array as normal.
protected $routeMiddleware = [
'access' => \App\Middleware\AllowAccess::class,
'auth' => \App\Middleware\Authenticate::class,
...
is being changed to this run I…

secondman
- 3,233
- 6
- 43
- 66
-1
votes
1 answer
Problem with php storm configuration, CS Fixer Code Sniffer Mess Detector
I've tried to configure my PHP storm with all that stuff. I have positive feedback about validations. Also in inspection looks properly, but I constantly get an error of status 500.
Thanks in advance
-1
votes
1 answer
How to make this PHP code pass the php-cs-fixer?
Php-cs-fixer returns the error 'braces' for one of the files. The following code causes the problem:
$meetings = Meeting::where(function ($query) use ($meeting_type_id) {
//doSomething
});
Php-cs-fixer uses the default psr1, psr2 rules…

achLei86
- 11
-2
votes
1 answer
How to catch php spelling errors with static analyzers?
I was made a mistake yesterday and spent hours to fix it. I have method like this
{
if (isset($data['y'])) {
$this->y = $data['y'];
}
if (isset($data['z'])) {
$this->y = $data['z']; // <- error here
}
}
And yes, I…

Vladimir Martsul
- 1
- 1