| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 31 | public function update(ApiCall $call, Pheal $pheal) |
||
| 32 | { |
||
| 33 | $this->entityManager->createQuery('delete from TariochEveapiFetcherBundle:MapSovereignty')->execute(); |
||
| 34 | |||
| 35 | $api = $pheal->mapScope->Sovereignty(); |
||
| 36 | foreach ($api->solarSystems as $solarSystem) { |
||
| 37 | $mapSov = new MapSovereignty( |
||
| 38 | $solarSystem->solarSystemID, |
||
| 39 | $solarSystem->allianceID, |
||
| 40 | $solarSystem->corporationID, |
||
| 41 | $solarSystem->factionID, |
||
| 42 | $solarSystem->solarSystemName |
||
| 43 | ); |
||
| 44 | $this->entityManager->persist($mapSov); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $api->cached_until; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |