Skip to content

Commit d66317a

Browse files
committed
Avoid referencing OpenSSLCertificate directly for PHPStan on PHP < 8
1 parent 65bc967 commit d66317a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/CaBundle.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public static function findDistrustedCertificate(array $chain)
254254
*/
255255
private static function isX509Certificate($cert)
256256
{
257-
return $cert instanceof \OpenSSLCertificate || (is_resource($cert) && get_resource_type($cert) === 'OpenSSL X.509');
257+
return is_a($cert, 'OpenSSLCertificate') || (is_resource($cert) && get_resource_type($cert) === 'OpenSSL X.509');
258258
}
259259

260260
/**

0 commit comments

Comments
 (0)