Skip to content

Commit

Permalink
fixed personalDataExportXml test
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmannmartin committed Nov 11, 2024
1 parent e7745fb commit 7053ac8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Model/Complaint/Complaint.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ class Complaint
*/
public function __construct(ComplaintData $complaintData, array $complaintItems)
{
$this->createdAt = new DateTime();
if ($complaintData->createdAt === null) {
$this->createdAt = new DateTime();
} else {
$this->createdAt = $complaintData->createdAt;
}

$this->uuid = $complaintData->uuid ?? Uuid::uuid4()->toString();
$this->number = $complaintData->number;
$this->domainId = $complaintData->domainId;
Expand Down
5 changes: 5 additions & 0 deletions src/Model/Complaint/ComplaintData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class ComplaintData
*/
public $number;

/**
* @var \DateTime|null
*/
public $createdAt;

/**
* @var \Shopsys\FrameworkBundle\Model\Order\Order|null
*/
Expand Down

0 comments on commit 7053ac8

Please sign in to comment.