From 04b0d86a8a7e2d2d6cd60a1603e5ab3c56bc92bb Mon Sep 17 00:00:00 2001 From: Nathan Patrizi Date: Sat, 13 Jun 2026 22:29:54 +0100 Subject: [PATCH] Fix deprecations for PHP 8.4 --- src/PHPClass2WSDL.php | 2 +- src/WSDL.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/PHPClass2WSDL.php b/src/PHPClass2WSDL.php index b3d23ed..8b2419a 100644 --- a/src/PHPClass2WSDL.php +++ b/src/PHPClass2WSDL.php @@ -250,7 +250,7 @@ protected function addMethodToWsdl(ReflectionMethod $method, DOMElement $port, D // Add any documentation for the operation. $description = $method->getReflectionDocComment()->getFullDescription(); - if (isset($description) && (strlen($description) > 0)) { + if (strlen($description) > 0) { $this->wsdl->addDocumentation($portOperation, $description); } diff --git a/src/WSDL.php b/src/WSDL.php index c1191d5..ab833d9 100644 --- a/src/WSDL.php +++ b/src/WSDL.php @@ -110,7 +110,6 @@ public function __construct($name, $uri, $xslUri = null) * Set the stylesheet for the WSDL. * * @param string $xslUri The URI to the stylesheet. - * @return WSDL */ private function setStylesheet($xslUri) { @@ -211,12 +210,12 @@ public function addSoapBinding( * * @param DOMElement $binding The binding element (from addBinding() method). * @param string $name The name of the operation. - * @param array $input Attributes for the input element (use, namespace, encodingStyle). - * @param array $output Attributes for the output element (use, namespace, encodingStyle). + * @param array|null $input Attributes for the input element (use, namespace, encodingStyle). + * @param array|null $output Attributes for the output element (use, namespace, encodingStyle). * @return DOMElement * @link http://www.w3.org/TR/wsdl#_soap:body */ - public function addBindingOperation(DOMElement $binding, $name, array $input = null, array $output = null) + public function addBindingOperation(DOMElement $binding, $name, ?array $input = null, ?array $output = null) { $operation = $this->dom->createElement('operation'); $operation->setAttribute('name', $name);