How can IDE support be improved when using PHP methods that return arrays?

When using PHP methods that return arrays, IDE support can be improved by providing type hints for the returned array. This allows the IDE to provide better code completion, type checking, and documentation for the array elements. By specifying the array type in the method's return type declaration, the IDE can provide more accurate suggestions and help prevent potential errors.

/**
 * @return array
 */
public function getArray(): array {
    return ['item1', 'item2', 'item3'];
}