The expression return imagecreatefrompng($filename) could also return false which is incompatible with the documented return type resource. 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.
Loading history...
14
}
15
16
/**
17
* @param resource $resource
18
* @param string $filename
19
* @param int $compression
20
* @return void
21
*/
22
1
public function save($resource, string $filename = null, int $compression = 100): void
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.