[Proposal] Array Items on Separate Lines Fixer
Author: vinklaCreated May 26, 2015Updated Sep 1, 2026
Labelsstatus/to verifykind/feature requesttopic/whitespace
I often find myself putting array items on separate lines. Specially when there are a lot of items in the arrays. Maybe we could add a fixer for that? Maybe it exists already? Example below:
// Before
protected $dates = ['deleted_at', 'ended_at', 'started_at'];
// After
protected $dates = [
'deleted_at',
'ended_at',
'started_at'
];What do you think?
Source: PHP-CS-Fixer/PHP-CS-Fixer