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