Last active
November 1, 2018 10:50
-
-
Save basz/8ec74b477e4ee6f3cacd7b9feedd400b to your computer and use it in GitHub Desktop.
SHouldn't be null returned getAggregateRoot
This file contains hidden or 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
| final class DossierAggregateRepository extends AggregateRepository implements DossierRepository | |
| { | |
| public function save(Dossier $dossier): void | |
| { | |
| $this->saveAggregateRoot($dossier); | |
| } | |
| public function get(DossierId $dossierId): ?Dossier | |
| { | |
| $ar = $this->getAggregateRoot((string) $dossierId); | |
| if (get_class($ar) !== Dossier::class) { | |
| return null; | |
| } | |
| return $ar; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment