Skip to content

Commit

Permalink
Remove unused User::setProfile function
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Sep 19, 2015
1 parent b94167e commit c32688a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
13 changes: 0 additions & 13 deletions api/app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,6 @@ public function setCredential(UserCredential $credential)
return $this;
}

/**
* Set the user's profile.
*
* @param UserProfile $profile
* @return $this
*/
public function setProfile(UserProfile $profile)
{
$this->userProfile()->save($profile);

return $this;
}

/**
* Add or update a social login for the user.
*
Expand Down
7 changes: 5 additions & 2 deletions api/database/seeds/UserStorySeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ public function run()
*/
protected function createUser(array $attributes = [])
{
$user = factory(User::class)->create($attributes);
/** @var User $user */
$user = factory(User::class)
->create($attributes);

$user->userProfile()->save(factory(UserProfile::class)->make());
$user->setCredential(factory(UserCredential::class)->make());
$user->setProfile(factory(UserProfile::class)->make());
}
}

0 comments on commit c32688a

Please sign in to comment.