Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Allow and set empty alliance if corporation leave alliance.
Browse files Browse the repository at this point in the history
  • Loading branch information
henning-gerhardt committed Jan 12, 2016
1 parent 5751f14 commit fc062c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Classes/Domain/Mapper/CharacterMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ protected function setCharacterInformationFromCharacterInfoResponse($character,
if ((! empty($allianceId)) && (! empty($allianceName))) {
$allianceModel = $this->getOrCreateAllianceModel($allianceId, $allianceName);
$corporationModel->setCurrentAlliance($allianceModel);
} else {
$corporationModel->setCurrentAlliance(\NULL);
}
$character->setCurrentCorporation($corporationModel);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Corporation.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function getCurrentAlliance() {
*
* @param \Gerh\Evecorp\Domain\Model\Alliance $alliance
*/
public function setCurrentAlliance(\Gerh\Evecorp\Domain\Model\Alliance $alliance) {
public function setCurrentAlliance(\Gerh\Evecorp\Domain\Model\Alliance $alliance = \NULL) {
$this->currentAlliance = $alliance;
}

Expand Down

0 comments on commit fc062c0

Please sign in to comment.