diff --git a/src/CXml/Endpoint.php b/src/CXml/Endpoint.php index ab70d4e..bef4173 100644 --- a/src/CXml/Endpoint.php +++ b/src/CXml/Endpoint.php @@ -29,6 +29,10 @@ public function __construct( $this->logger = $logger ?? new NullLogger(); } + /** + * @throws CXmlException + * @throws CXmlInvalidException + */ public function parseAndProcessStringAsCXml(string $xml, Context $context = null): ?CXml { $this->logger->info('Processing incoming CXml message', ['xml' => $xml]); diff --git a/src/CXml/Handler/Exception/CXmlHandlerNotFoundException.php b/src/CXml/Handler/Exception/CXmlHandlerNotFoundException.php index 4302953..7addfb7 100644 --- a/src/CXml/Handler/Exception/CXmlHandlerNotFoundException.php +++ b/src/CXml/Handler/Exception/CXmlHandlerNotFoundException.php @@ -8,6 +8,6 @@ class CXmlHandlerNotFoundException extends CXmlNotImplementedException { public function __construct(string $handlerId, \Throwable $previous = null) { - parent::__construct("Handler for {$handlerId} not found. Register first.", $previous); + parent::__construct("Handler for $handlerId not found. Register first.", $previous); } } diff --git a/src/CXml/Handler/HandlerRegistry.php b/src/CXml/Handler/HandlerRegistry.php index b827749..bd3e124 100644 --- a/src/CXml/Handler/HandlerRegistry.php +++ b/src/CXml/Handler/HandlerRegistry.php @@ -18,7 +18,7 @@ public function register(HandlerInterface $handler, string $handlerId = null): v $handlerId = $handler::getRequestName(); } - Assertion::keyNotExists($this->registry, $handlerId, "Handler for '{$handlerId}' already registered."); + Assertion::keyNotExists($this->registry, $handlerId, "Handler for '$handlerId' already registered."); $this->registry[$handlerId] = $handler; } diff --git a/src/CXml/Jms/JmsDateTimeHandler.php b/src/CXml/Jms/JmsDateTimeHandler.php index b861550..ac67ecf 100644 --- a/src/CXml/Jms/JmsDateTimeHandler.php +++ b/src/CXml/Jms/JmsDateTimeHandler.php @@ -15,7 +15,7 @@ */ class JmsDateTimeHandler { - public function serialize(XmlSerializationVisitor $visitor, \DateTimeInterface $date, array $type, Context $context) + public function serialize(XmlSerializationVisitor $visitor, \DateTimeInterface $date, array $type, Context $context): \DOMText { if ($date instanceof Date) { $format = 'Y-m-d'; diff --git a/src/CXml/Model/Date.php b/src/CXml/Model/Date.php index 102c998..c94d116 100644 --- a/src/CXml/Model/Date.php +++ b/src/CXml/Model/Date.php @@ -8,7 +8,6 @@ */ class Date extends \DateTime { - #[\ReturnTypeWillChange] public static function createFromFormat($format, $datetime, \DateTimeZone $timezone = null) { $dateTime = parent::createFromFormat($format, $datetime, $timezone);