| @@ 177-187 (lines=11) @@ | ||
| 174 | * @param Model\Bot $bot |
|
| 175 | * @param array|boolean $botRaw |
|
| 176 | */ |
|
| 177 | private function hydrateBot(Model\Bot $bot, $botRaw) |
|
| 178 | { |
|
| 179 | $bot->setIsBot(true); |
|
| 180 | ||
| 181 | if (isset($botRaw['name']) && $this->isRealResult($botRaw['name'])) { |
|
| 182 | $bot->setName($botRaw['name']); |
|
| 183 | } |
|
| 184 | if (isset($botRaw['category']) && $this->isRealResult($botRaw['category'])) { |
|
| 185 | $bot->setType($botRaw['category']); |
|
| 186 | } |
|
| 187 | } |
|
| 188 | ||
| 189 | /** |
|
| 190 | * |
|
| @@ 194-203 (lines=10) @@ | ||
| 191 | * @param Model\Browser $browser |
|
| 192 | * @param array|string $clientRaw |
|
| 193 | */ |
|
| 194 | private function hydrateBrowser(Model\Browser $browser, $clientRaw) |
|
| 195 | { |
|
| 196 | if (isset($clientRaw['name']) && $this->isRealResult($clientRaw['name']) === true) { |
|
| 197 | $browser->setName($clientRaw['name']); |
|
| 198 | } |
|
| 199 | ||
| 200 | if (isset($clientRaw['version']) && $this->isRealResult($clientRaw['version']) === true) { |
|
| 201 | $browser->getVersion()->setComplete($clientRaw['version']); |
|
| 202 | } |
|
| 203 | } |
|
| 204 | ||
| 205 | /** |
|
| 206 | * |
|
| @@ 222-231 (lines=10) @@ | ||
| 219 | * @param Model\OperatingSystem $os |
|
| 220 | * @param array|string $osRaw |
|
| 221 | */ |
|
| 222 | private function hydrateOperatingSystem(Model\OperatingSystem $os, $osRaw) |
|
| 223 | { |
|
| 224 | if (isset($osRaw['name']) && $this->isRealResult($osRaw['name']) === true) { |
|
| 225 | $os->setName($osRaw['name']); |
|
| 226 | } |
|
| 227 | ||
| 228 | if (isset($osRaw['version']) && $this->isRealResult($osRaw['version']) === true) { |
|
| 229 | $os->getVersion()->setComplete($osRaw['version']); |
|
| 230 | } |
|
| 231 | } |
|
| 232 | ||
| 233 | /** |
|
| 234 | * |
|
| @@ 133-142 (lines=10) @@ | ||
| 130 | * @param Model\Browser $browser |
|
| 131 | * @param array $resultRaw |
|
| 132 | */ |
|
| 133 | private function hydrateBrowser(Model\Browser $browser, array $resultRaw) |
|
| 134 | { |
|
| 135 | if (isset($resultRaw['name']) && $this->isRealResult($resultRaw['name']) === true) { |
|
| 136 | $browser->setName($resultRaw['name']); |
|
| 137 | } |
|
| 138 | ||
| 139 | if (isset($resultRaw['version']) && $this->isRealResult($resultRaw['version']) === true) { |
|
| 140 | $browser->getVersion()->setComplete($resultRaw['version']); |
|
| 141 | } |
|
| 142 | } |
|
| 143 | ||
| 144 | /** |
|
| 145 | * |
|