Php-cs-fixer: Camelcase for method name

Created on 4 Nov 2016  路  5Comments  路  Source: FriendsOfPHP/PHP-CS-Fixer

Hi,

Accorindg to PSR-2 Method names MUST be declared in camelCase() : http://www.php-fig.org/psr/psr-1/#4-3-methods

I was running to fix the code against a snake_case method. But seems it is unable to fix to camelCase. Or was that purposefully left ?

Thank you.

Most helpful comment

it's a big problem

All 5 comments

Changing the method name from a_b to aB will break the code.

Breaking code is not the problem :-) when you are trying to fix it .

it's a big problem

It would be great if we had as output the numbers of lines with bad code

Due to the dynamic nature of PHP (and the way it represents things as strings), it's impossible to actually automatically fix such things.

Was this page helpful?
0 / 5 - 0 ratings