Closed finalblast closed 1 year ago
Before
<?php class Test { public function test() { $item = [ 'id' => 1, 'type' => 'x', 'name' => 'Test' ]; $suffix = 'Blah'; $test = "{$item['name']} ({$item['id']}) | {$item['type']} {$suffix}"; return $test; } }
After
<?php class Test { public function test() { $item = [ 'id' => 1, 'type' => 'x', 'name' => 'Test' ]; $suffix = 'Blah'; $test = "{$item['name'];} ({$item['id'];}) | {$item['type'];} {$suffix}"; return $test; } }
Configs:
{ "version": 4, "php_bin": "/opt/homebrew/opt/php@7.4/bin/php", "format_on_save": false, "autocomplete": true, "autoimport": true, "disable_auto_align": true, "indent_with_space": true, "passes": [ "StripExtraCommaInArray", "RemoveSemicolonAfterCurly", "NewLineBeforeReturn", "AddMissingParentheses", "ReindentSwitchBlocks", "OrderAndRemoveUseClauses", "DocBlockToComment", "PSR2EmptyFunction", "StripSpaceWithinControlStructures", "ShortArray", "AutoSemicolon", "OrderMethod", // 2023-06-05 "OrganizeClass", // 2023-06-05 "OrderMethodAndVisibility", // 2023-06-05 "SortUseNameSpace", // 2023-06-05 "SpaceBetweenMethods", // 2023-06-05 "TrimSpaceBeforeSemicolon", // 2023-06-05 "DoubleToSingleQuote" ], "psr1": false, "psr2": true, "smart_linebreak_after_curly": true, "visibility_order": true, "yoda": false, }
Thanks @finalblast, may you please confirm?
@driade Worked perfect. Thank you.
Before
After
Configs: