Skip to content

Commit 6252806

Browse files
HP-1751 tiny (#97)
1 parent c52b7cd commit 6252806

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/sale/Sale.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getCloseTime(): ?DateTimeImmutable
105105
return $this->closeTime;
106106
}
107107

108-
public function close(DateTimeImmutable $closeTime): void
108+
public function close(DateTimeImmutable $closeTime): self
109109
{
110110
if ($this->closeTime !== null) {
111111
throw new InvariantException('Sale is already closed');
@@ -116,6 +116,8 @@ public function close(DateTimeImmutable $closeTime): void
116116
}
117117

118118
$this->closeTime = $closeTime;
119+
120+
return $this;
119121
}
120122

121123
public function setId($id)

src/sale/SaleInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getData(): ?array;
7171
* @throws InvariantException
7272
* @throws ConstraintException
7373
*/
74-
public function close(DateTimeImmutable $closeTime): void;
74+
public function close(DateTimeImmutable $closeTime): self;
7575

7676
public function cancelClosing(): void;
7777
}

0 commit comments

Comments
 (0)