Browse Source

configure php stan

master
eater 2 years ago
parent
commit
86f8af038b
Signed by: eater GPG Key ID: AD2560A0F84F0759
  1. 6
      phpstan.neon
  2. 11
      src/OpenSSL/Instance.php

6
phpstan.neon

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

11
src/OpenSSL/Instance.php

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