Skip to content

Commit

Permalink
fix: Message document link
Browse files Browse the repository at this point in the history
  • Loading branch information
wadedvsa committed Feb 23, 2024
1 parent 4ee0e3f commit be12fe9
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Command/Document/UpdateDocumentLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use Dvsa\Olcs\Transfer\FieldType\Traits\ApplicationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\BusRegOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\CasesOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\ConversationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\IrhpApplicationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\LicenceOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessageOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessagingConversationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessagingMessageOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\TransportManagerOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\SurrenderOptional;
use Dvsa\Olcs\Transfer\Util\Annotation as Transfer;
Expand All @@ -35,8 +35,8 @@ final class UpdateDocumentLinks extends AbstractCommand
use LicenceOptional;
use IrhpApplicationOptional;
use SurrenderOptional;
use ConversationOptional;
use MessageOptional;
use MessagingConversationOptional;
use MessagingMessageOptional;

/**
* @var int
Expand Down
8 changes: 4 additions & 4 deletions src/Command/Document/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use Dvsa\Olcs\Transfer\FieldType\Traits\ApplicationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\BusRegOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\CasesOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\ConversationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\LicenceOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessageOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessagingConversationOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\MessagingMessageOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\SurrenderOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\TransportManagerOptional;
use Dvsa\Olcs\Transfer\FieldType\Traits\IrhpApplicationOptional;
Expand All @@ -34,8 +34,8 @@ final class Upload extends AbstractCommand implements LoggerOmitContentInterface
use LicenceOptional;
use SurrenderOptional;
use IrhpApplicationOptional;
use ConversationOptional;
use MessageOptional;
use MessagingConversationOptional;
use MessagingMessageOptional;

/**
* @Transfer\Filter("Laminas\Filter\PregReplace", options={"pattern": "/[^a-zA-Z0-9\-\_\.]+/", "replacement": ""})
Expand Down
28 changes: 28 additions & 0 deletions src/FieldType/Traits/MessagingConversationOptional.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace Dvsa\Olcs\Transfer\FieldType\Traits;

trait MessagingConversationOptional
{
/**
* @var int
* @Transfer\Optional
* @Transfer\Filter("Laminas\Filter\Digits")
* @Transfer\Validator("Laminas\Validator\Digits")
* @Transfer\Validator("Laminas\Validator\GreaterThan", options={"min": 0})
*/
protected $messagingConversation = null;

public function getMessagingConversation(): ?int
{
return $this->messagingConversation ? (int)$this->messagingConversation : null;
}

/** @param int $conversationId */
public function setMessagingConversation($conversationId)
{
$this->messagingConversation = $conversationId ? (int)$conversationId : null;
}
}
28 changes: 28 additions & 0 deletions src/FieldType/Traits/MessagingMessageOptional.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

namespace Dvsa\Olcs\Transfer\FieldType\Traits;

trait MessagingMessageOptional
{
/**
* @var int
* @Transfer\Optional
* @Transfer\Filter("Laminas\Filter\Digits")
* @Transfer\Validator("Laminas\Validator\Digits")
* @Transfer\Validator("Laminas\Validator\GreaterThan", options={"min": 0})
*/
protected $messagingMessage = null;

public function getMessagingMessage(): ?int
{
return $this->messagingMessage ? (int)$this->messagingMessage : null;
}

/** @param int $messageId */
public function setMessagingMessage($messageId)
{
$this->messagingMessage = $messageId ? (int)$messageId : null;
}
}

0 comments on commit be12fe9

Please sign in to comment.