| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function createCurrentApiCallMap(ApiKey $key) |
||
| 26 | { |
||
| 27 | $apiCallRepo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:ApiCall'); |
||
| 28 | $currentApiCalls = $apiCallRepo->findNormalCallsByKey($key); |
||
| 29 | |||
| 30 | $currentApiCallMap = array(); |
||
| 31 | foreach ($currentApiCalls as $apiCall) { |
||
| 32 | $apiId = $apiCall->getApi()->getApiId(); |
||
| 33 | if (!isset($currentApiCallMap[$apiId])) { |
||
| 34 | $currentApiCallMap[$apiId] = array(); |
||
| 35 | } |
||
| 36 | |||
| 37 | $owner = $apiCall->getOwner(); |
||
| 38 | $currentApiCallMap[$apiId][$owner === null ? 0 : $owner->getId()] = $apiCall; |
||
| 39 | } |
||
| 40 | |||
| 41 | return $currentApiCallMap; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |