The expression return getimagesize($filePathName) could also return false which is incompatible with the documented return type array. Did you maybe forget to handle an error condition?
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.