I have this:
$accountNr = $csvData[2][1];
$firstname = $csvData[3][1];
$lastname = $csvData[4][1];
$telephone1 = $csvData[5][1];
$telephone2 = $csvData[6][1];
$telephone3 = $csvData[7][1];
$telephone4 = $csvData[8][1];
$email1 = $csvData[9][1];
$email2 = $csvData[10][1];
$email3 = $csvData[11][1];
$email4 = $csvData[12][1];
$address1 = $csvData[13][1];
$address2 = $csvData[14][1];
$zip = $csvData[15][1];
$state = $csvData[16][1];
I want this:
$accountNr = $csvData[2][1];
$firstname = $csvData[3][1];
$lastname = $csvData[4][1];
$telephone1 = $csvData[5][1];
$telephone2 = $csvData[6][1];
$telephone3 = $csvData[7][1];
$telephone4 = $csvData[8][1];
$email1 = $csvData[9][1];
$email2 = $csvData[10][1];
$email3 = $csvData[11][1];
$email4 = $csvData[12][1];
$address1 = $csvData[13][1];
$address2 = $csvData[14][1];
$zip = $csvData[15][1];
$state = $csvData[16][1];
There is a IntelliJ plugin called "String Manipulation" that does exactly that.
But: when I select the whole file and format it using the formatting of PhpStorm, everything gets changed again.
Is there a different cleaner way to do it?
Settings/Preferences
Editor | Code Style | PHP
Wrapping and Braces --> Assignment statement
Align consecutive assignments
option