NullableReturnStatement
A nullable value is returned from a function with a non-nullable return type.
Example
Section titled “Example”<?phpfunction getName(): string { return null; // null is not a string}How to fix
Section titled “How to fix”Change the return type to ?string or ensure a non-null value is always returned.