I have been receiving a PHP Code Sniffer error relating to line 7 in the code below.
Moving the next square open bracket to this line seems to introduce new errors. I'm a little unclear as to how to resolve this.
Opening parenthesis of a multi-line function call must be the last content
if ($cms_user) {
array_push($buttons, [
'id' => 5,
'name' => 'Home Page'
]);
} elseif ($public) {
array_push($buttons,
[
'id' => 3,
'name' => 'About Us'
],
[
'id' => 11,
'name' => 'Reflection',
],
[
'id' => 2,
'name' => 'Contact Us',
]
);
}