| @@ 193-203 (lines=11) @@ | ||
| 190 | * @param Model\Bot $bot |
|
| 191 | * @param array|boolean $botRaw |
|
| 192 | */ |
|
| 193 | private function hydrateBot(Model\Bot $bot, $botRaw) |
|
| 194 | { |
|
| 195 | $bot->setIsBot(true); |
|
| 196 | ||
| 197 | if (isset($botRaw['name']) && $this->isRealResult($botRaw['name'])) { |
|
| 198 | $bot->setName($botRaw['name']); |
|
| 199 | } |
|
| 200 | if (isset($botRaw['category']) && $this->isRealResult($botRaw['category'])) { |
|
| 201 | $bot->setType($botRaw['category']); |
|
| 202 | } |
|
| 203 | } |
|
| 204 | ||
| 205 | /** |
|
| 206 | * |
|
| @@ 210-219 (lines=10) @@ | ||
| 207 | * @param Model\Browser $browser |
|
| 208 | * @param array|string $clientRaw |
|
| 209 | */ |
|
| 210 | private function hydrateBrowser(Model\Browser $browser, $clientRaw) |
|
| 211 | { |
|
| 212 | if (isset($clientRaw['name']) && $this->isRealResult($clientRaw['name']) === true) { |
|
| 213 | $browser->setName($clientRaw['name']); |
|
| 214 | } |
|
| 215 | ||
| 216 | if (isset($clientRaw['version']) && $this->isRealResult($clientRaw['version']) === true) { |
|
| 217 | $browser->getVersion()->setComplete($clientRaw['version']); |
|
| 218 | } |
|
| 219 | } |
|
| 220 | ||
| 221 | /** |
|
| 222 | * |
|
| @@ 238-247 (lines=10) @@ | ||
| 235 | * @param Model\OperatingSystem $os |
|
| 236 | * @param array|string $osRaw |
|
| 237 | */ |
|
| 238 | private function hydrateOperatingSystem(Model\OperatingSystem $os, $osRaw) |
|
| 239 | { |
|
| 240 | if (isset($osRaw['name']) && $this->isRealResult($osRaw['name']) === true) { |
|
| 241 | $os->setName($osRaw['name']); |
|
| 242 | } |
|
| 243 | ||
| 244 | if (isset($osRaw['version']) && $this->isRealResult($osRaw['version']) === true) { |
|
| 245 | $os->getVersion()->setComplete($osRaw['version']); |
|
| 246 | } |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * |
|
| @@ 142-151 (lines=10) @@ | ||
| 139 | * @param Model\Browser $browser |
|
| 140 | * @param array $resultRaw |
|
| 141 | */ |
|
| 142 | private function hydrateBrowser(Model\Browser $browser, array $resultRaw) |
|
| 143 | { |
|
| 144 | if (isset($resultRaw['name']) && $this->isRealResult($resultRaw['name']) === true) { |
|
| 145 | $browser->setName($resultRaw['name']); |
|
| 146 | } |
|
| 147 | ||
| 148 | if (isset($resultRaw['version']) && $this->isRealResult($resultRaw['version']) === true) { |
|
| 149 | $browser->getVersion()->setComplete($resultRaw['version']); |
|
| 150 | } |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * |
|