MIR0220
InvalidArrayAssignment
An assignment of the form $value[key] = ... is made to a value whose type does not support
array-style assignment. Only arrays and objects implementing ArrayAccess support this syntax.
Example
Section titled “Example”<?phpfunction setFirst(string $items, mixed $val): void { $items[0] = $val; // string does not support array-style assignment}How to fix
Section titled “How to fix”Change the type to an array or an ArrayAccess implementation, or avoid array-style assignment.