Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
namespace Scrum\EloquentInfrastructure\Persistence\UserStories;
use Scrum\Domain\Models\User\UserId;
use Scrum\Domain\Models\UserStories\UserStory;
use Scrum\Domain\Models\UserStories\UserStoryId;
use Scrum\Domain\Models\UserStories\UserStoryRepositoryInterface;
use Scrum\EloquentInfrastructure\Models\UserStoryDataModel;
class EloquentUserStoryRepository implements UserStoryRepositoryInterface
public function find(UserStoryId $id): ?UserStory
$data = UserStoryDataModel::where("id", $id->getValue())
if (is_null($data)) {
return null;
return new UserStory(
new UserStoryId($data->id),
new UserId($data->author),
public function save(UserStory $userStory): void
["id" => $userStory->getId()->getValue()],
"story" => $userStory->getStory(),
"author" => $userStory->getAuthor()->getValue(),
"demo" => $userStory->getDemo(),
"estimation" => $userStory->getEstimation(),
"seq" => $userStory->getSeq()