From 6c9d624d812e9e5fa2c44c45b26cff2c8870d796 Mon Sep 17 00:00:00 2001 From: Dominique FOURNIER Date: Fri, 14 Oct 2022 21:01:23 +0200 Subject: [PATCH] Certificationauthority.php : phpstan valid in level 6 --- src/Certificationauthority.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Certificationauthority.php b/src/Certificationauthority.php index 4ae1a12..8594c8e 100644 --- a/src/Certificationauthority.php +++ b/src/Certificationauthority.php @@ -113,7 +113,7 @@ extendedKeyUsage = serverAuth, clientAuth /** Get/Set the ca cert * @param string|null $caCert The CA cert to get/set - * @return (string|self if caCert = null) the CA if get in PEM, $this if set + * @return ($caCert is null ? string : $this) the CA if get in PEM, $this if set */ public function caCert ($caCert = null) { @@ -127,7 +127,7 @@ extendedKeyUsage = serverAuth, clientAuth /** Get/Set the ca key * @param string|null $caKey The CA key to get/set - * @return (string|self if caKey = null) the CA if get, $this if set + * @return ($caKey is null ? string : $this) the CA if get, $this if set */ public function caKey ($caKey = null) { @@ -154,7 +154,7 @@ extendedKeyUsage = serverAuth, clientAuth /** Get in PEM/Set the private key * @param string|null $privateKey The private key to use - * @return (string|self if $privateKey = null) the privatekey if get in PEM, $this if set + * @return ($privateKey is null ? string : $this) the privatekey if get in PEM, $this if set */ public function privateKey ($privateKey = null) { @@ -229,7 +229,7 @@ extendedKeyUsage = serverAuth, clientAuth } $this->configargs["x509_extensions"] = "v3_req"; $usercert = openssl_csr_sign ($csr, $caCert, $caKey, $days, - $this->configargs, date ("YmdHis")); + $this->configargs, intval(date ("YmdHis"))); if ($usercert === false) throw new \Exception ("Can not create certificate : " . openssl_error_string (), 500);