Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mathielen committed Apr 7, 2024
1 parent cda8c7a commit 0788b20
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/CXml/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/CXml/Handler/HandlerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CXml/Jms/JmsDateTimeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion src/CXml/Model/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
class Date extends \DateTime
{
#[\ReturnTypeWillChange]
public static function createFromFormat($format, $datetime, \DateTimeZone $timezone = null)
{
$dateTime = parent::createFromFormat($format, $datetime, $timezone);
Expand Down

0 comments on commit 0788b20

Please sign in to comment.