Php-cs-fixer: Rule for "Single Space Around Assignment Operator"?

Created on 5 Aug 2018  路  1Comment  路  Source: FriendsOfPHP/PHP-CS-Fixer

Is there an existing rule that facilitate the following?

The following ...

$one = 1;
$two     = 2;
$three =     3;
$four     =     4;
$five=5;
$six     =6;
$seven=     7;

... should turn into ...

$one = 1;
$two = 2;
$three = 3;
$four = 4;
$five = 5;
$six = 6;
$seven = 7;
kinquestion

Most helpful comment

This fixes it:

'binary_operator_spaces' => [
    'operators' => [
        '=' => 'single_space',
    ]
],

>All comments

This fixes it:

'binary_operator_spaces' => [
    'operators' => [
        '=' => 'single_space',
    ]
],
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sennewood picture sennewood  路  3Comments

amitbisht511 picture amitbisht511  路  3Comments

carusogabriel picture carusogabriel  路  3Comments

aidantwoods picture aidantwoods  路  3Comments

UksusoFF picture UksusoFF  路  3Comments