Created
October 31, 2021 23:34
-
-
Save ismail1432/27aa3b5e5f22f4c3d80d1ba0a7563252 to your computer and use it in GitHub Desktop.
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
<?php | |
namespace App\Infrastucture\InMemory; | |
use App\Domain\User; | |
use App\Domain\UserRepositoryInterface; | |
class InMemoryUserRepository implements UserRepositoryInterface | |
{ | |
private User[] $users; | |
public function save(User $user): void | |
{ | |
$this->users[$user->getUserId()->getId()] = $user; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment