| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 18 | public function update(ApiCall $call, ApiKey $key, Pheal $pheal) |
||
| 19 | { |
||
| 20 | $owner = $call->getOwner(); |
||
| 21 | $charId = $owner->getCharacterId(); |
||
| 22 | $api = $pheal->charScope->AccountBalance(array('characterID' => $charId)); |
||
| 23 | |||
| 24 | foreach ($api->accounts as $account) { |
||
| 25 | $entity = $this->loadOrCreate($account->accountID); |
||
| 26 | |||
| 27 | $entity->setOwnerId($charId); |
||
| 28 | $entity->setAccountKey($account->accountKey); |
||
| 29 | $entity->setBalance($account->balance); |
||
| 30 | $this->entityManager->flush($entity); |
||
| 31 | } |
||
| 32 | |||
| 33 | return $api->cached_until; |
||
| 34 | } |
||
| 35 | |||
| 47 |