Created
December 8, 2021 17:25
-
-
Save dgafka/a11c1b3cf79be8e899b7d74a89ce7390 to your computer and use it in GitHub Desktop.
Event Sourcing PHP 02
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Product | |
{ | |
private int $productId; | |
private float $price; | |
public function changePrice(float $price): array | |
{ | |
return [new PriceWasChanged($this->productId, $price)]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment