configure php stan
continuous-integration/drone/push Build is passing Details

master
eater 5 years ago
parent 61ae62f69b
commit 86f8af038b
Signed by: eater
GPG Key ID: AD2560A0F84F0759

@ -0,0 +1,6 @@
parameters:
universalObjectCratesClasses:
- FFI
- FFI\CData
ignoreErrors:
- '~^Call to an undefined method FFI::~'

@ -52,9 +52,10 @@ class Instance
public function init() public function init()
{ {
$this->load(); $this->load();
$this->ffi->ERR_load_crypto_strings(); $ffi = $this->getFFI();
$this->ffi->OPENSSL_add_all_algorithms_conf(); $ffi->ERR_load_crypto_strings();
$this->ffi->OPENSSL_config(null); $ffi->OPENSSL_add_all_algorithms_conf();
$ffi->OPENSSL_config(null);
} }
public function __destruct() public function __destruct()
@ -70,6 +71,10 @@ class Instance
public function getFFI(): FFI public function getFFI(): FFI
{ {
if ($this->ffi === null) {
throw new \RuntimeException("Failed to load FFI");
}
return $this->ffi; return $this->ffi;
} }
} }
Loading…
Cancel
Save