diff --git a/src/library/FOSSBilling/Tools.php b/src/library/FOSSBilling/Tools.php index 28a2895b4..052f4c1dc 100644 --- a/src/library/FOSSBilling/Tools.php +++ b/src/library/FOSSBilling/Tools.php @@ -335,7 +335,7 @@ class Tools error_log(sprintf( 'Error fetching external IP from "%s" (%s): %s', $service, - get_class($e), + $e::class, $e->getMessage() )); } diff --git a/src/modules/Invoice/ServiceTransaction.php b/src/modules/Invoice/ServiceTransaction.php index abbaaff7e..334c24691 100644 --- a/src/modules/Invoice/ServiceTransaction.php +++ b/src/modules/Invoice/ServiceTransaction.php @@ -16,7 +16,7 @@ use FOSSBilling\InjectionAwareInterface; class ServiceTransaction implements InjectionAwareInterface { - private const PROCESSING_RECOVERY_TIMEOUT = 300; + private const int PROCESSING_RECOVERY_TIMEOUT = 300; protected ?\Pimple\Container $di = null; diff --git a/tests-legacy/modules/Invoice/ServiceTransactionTest.php b/tests-legacy/modules/Invoice/ServiceTransactionTest.php index 61b5fba64..fde09bd79 100644 --- a/tests-legacy/modules/Invoice/ServiceTransactionTest.php +++ b/tests-legacy/modules/Invoice/ServiceTransactionTest.php @@ -71,7 +71,7 @@ final class ServiceTransactionTest extends \BBTestCase $this->assertSame(\Model_Transaction::STATUS_RECEIVED, $params['received_status']); $this->assertSame(\Model_Transaction::STATUS_PROCESSING, $params['processing_status']); - $retryAfter = strtotime($params['processing_retry_after']); + $retryAfter = strtotime((string) $params['processing_retry_after']); $this->assertNotFalse($retryAfter); $now = time(); @@ -110,8 +110,8 @@ final class ServiceTransactionTest extends \BBTestCase $this->assertSame(\Model_Transaction::STATUS_PROCESSED, $params[4]); $this->assertSame(\Model_Transaction::STATUS_PROCESSING, $params[5]); - $claimedAt = strtotime($params[1]); - $retryAfter = strtotime($params[6]); + $claimedAt = strtotime((string) $params[1]); + $retryAfter = strtotime((string) $params[6]); $this->assertNotFalse($claimedAt); $this->assertNotFalse($retryAfter); $this->assertGreaterThanOrEqual(295, $claimedAt - $retryAfter); diff --git a/tests-legacy/modules/Servicedownloadable/ServiceTest.php b/tests-legacy/modules/Servicedownloadable/ServiceTest.php index 1dd50793a..cd8b54ed0 100644 --- a/tests-legacy/modules/Servicedownloadable/ServiceTest.php +++ b/tests-legacy/modules/Servicedownloadable/ServiceTest.php @@ -223,7 +223,6 @@ final class ServiceTest extends \BBTestCase private function invokeValidateFileUpload(\Symfony\Component\HttpFoundation\File\UploadedFile $file): void { $reflection = new \ReflectionMethod(Service::class, 'validateFileUpload'); - $reflection->setAccessible(true); $reflection->invoke($this->service, $file); } }