| Conditions | 4 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | public function createNewApiMap($accessMask, $keyType, array $chars) |
||
| 25 | { |
||
| 26 | $apiRepo = $this->entityManager->getRepository('TariochEveapiFetcherBundle:Api'); |
||
| 27 | $validApis = $apiRepo->loadValidApis($accessMask, $keyType); |
||
| 28 | |||
| 29 | $newApiMap = array(); |
||
| 30 | foreach ($validApis as $api) { |
||
| 31 | $apiId = $api->getApiId(); |
||
| 32 | $newApiMap[$apiId] = array(); |
||
| 33 | |||
| 34 | $section = $api->getSection(); |
||
| 35 | if ($section == 'account') { |
||
| 36 | $newApiMap[$apiId][0] = $api; |
||
| 37 | } else { |
||
| 38 | foreach ($chars as $ownerId) { |
||
| 39 | $newApiMap[$apiId][$ownerId] = $api; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 | |||
| 44 | return $newApiMap; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |