chouzz / vscode-better-align

Better vertical alignment with/without selection in any language.
https://marketplace.visualstudio.com/items?itemName=Chouzz.vscode-better-align&ssr=false#overview
Apache License 2.0
39 stars 4 forks source link

Problem with ??= (null coalescing assignment) PHP #107

Open Panniz opened 1 year ago

Panniz commented 1 year ago

When I try to align elements that are using the ??= operator it breaks the code.

        $item['id_specific_price_rule'] ??= 0;
        $item['id_cart'] ??= 0;
        $item['id_currency'] ??= 0;
        $item['id_country'] ??= 0;
        $item['id_group'] ??= 0;
        $item['id_customer'] ??= 0;
        $item['id_product_attribute'] ??= 0;
        $item['from_quantity'] ??= 1;
        $item['reduction_tax'] ??= 0;
        $item['reduction_type'] ??= 'amount';
        $item['from'] ??= '0000-00-00 00:00:00';
        $item['to'] ??= '0000-00-00 00:00:00';
        $item['id_specific_price_rule'] ?? = 0;
        $item['id_cart'] ??                = 0;
        $item['id_currency'] ??            = 0;
        $item['id_country'] ??             = 0;
        $item['id_group'] ??               = 0;
        $item['id_customer'] ??            = 0;
        $item['id_product_attribute'] ??   = 0;
        $item['from_quantity'] ??          = 1;
        $item['reduction_tax'] ??          = 0;
        $item['reduction_type'] ??         = 'amount';
        $item['from'] ??                   = '0000-00-00 00:00:00';
        $item['to'] ??                     = '0000-00-00 00:00:00';