WarWithinMe / better-align

A vscode extension to provide better vertical alignment
Other
75 stars 39 forks source link

Unable to format class on both side in php #56

Open biswajitpaul01 opened 4 years ago

biswajitpaul01 commented 4 years ago

It is unable to format below laravel code:

    protected $policies = [
        User::class => UserPolicy::class,
        Role::class => RolePolicy::class,
        Permission::class => PermissionPolicy::class,
        Building::class => BuildingPolicy::class,
        Apartment::class => ApartmentPolicy::class,
        Application::class => ApplicationPolicy::class,
    ];

When I select policy values and align using the keyboard shortcut, it becomes like below which is not valid syntax in php.

        User:       : class => UserPolicy:       : class,
        Role:       : class => RolePolicy:       : class,
        Permission: : class => PermissionPolicy: : class,
        Building:   : class => BuildingPolicy:   : class,
        Apartment:  : class => ApartmentPolicy:  : class,
        Application:: class => ApplicationPolicy:: class,
Philam18 commented 4 years ago

I'm using 1.1.6. Any tokens after the scope resolution operator are spaced:

ProfilerGeneral:: ID =>
    [
        ...
    ],