| @@ 145-155 (lines=11) @@ | ||
| 142 | * @param Model\Bot $bot |
|
| 143 | * @param array|boolean $botRaw |
|
| 144 | */ |
|
| 145 | private function hydrateBot(Model\Bot $bot, $botRaw) |
|
| 146 | { |
|
| 147 | $bot->setIsBot(true); |
|
| 148 | ||
| 149 | if (isset($botRaw['name']) && $this->isRealResult($botRaw['name'])) { |
|
| 150 | $bot->setName($botRaw['name']); |
|
| 151 | } |
|
| 152 | if (isset($botRaw['category']) && $this->isRealResult($botRaw['category'])) { |
|
| 153 | $bot->setType($botRaw['category']); |
|
| 154 | } |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * |
|
| @@ 162-171 (lines=10) @@ | ||
| 159 | * @param Model\Browser $browser |
|
| 160 | * @param array|string $clientRaw |
|
| 161 | */ |
|
| 162 | private function hydrateBrowser(Model\Browser $browser, $clientRaw) |
|
| 163 | { |
|
| 164 | if (isset($clientRaw['name']) && $this->isRealResult($clientRaw['name']) === true) { |
|
| 165 | $browser->setName($clientRaw['name']); |
|
| 166 | } |
|
| 167 | ||
| 168 | if (isset($clientRaw['version']) && $this->isRealResult($clientRaw['version']) === true) { |
|
| 169 | $browser->getVersion()->setComplete($clientRaw['version']); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * |
|
| @@ 190-199 (lines=10) @@ | ||
| 187 | * @param Model\OperatingSystem $os |
|
| 188 | * @param array|string $osRaw |
|
| 189 | */ |
|
| 190 | private function hydrateOperatingSystem(Model\OperatingSystem $os, $osRaw) |
|
| 191 | { |
|
| 192 | if (isset($osRaw['name']) && $this->isRealResult($osRaw['name']) === true) { |
|
| 193 | $os->setName($osRaw['name']); |
|
| 194 | } |
|
| 195 | ||
| 196 | if (isset($osRaw['version']) && $this->isRealResult($osRaw['version']) === true) { |
|
| 197 | $os->getVersion()->setComplete($osRaw['version']); |
|
| 198 | } |
|
| 199 | } |
|
| 200 | ||
| 201 | /** |
|
| 202 | * |
|
| @@ 101-110 (lines=10) @@ | ||
| 98 | * @param Model\Browser $browser |
|
| 99 | * @param array $resultRaw |
|
| 100 | */ |
|
| 101 | private function hydrateBrowser(Model\Browser $browser, array $resultRaw) |
|
| 102 | { |
|
| 103 | if (isset($resultRaw['name']) && $this->isRealResult($resultRaw['name']) === true) { |
|
| 104 | $browser->setName($resultRaw['name']); |
|
| 105 | } |
|
| 106 | ||
| 107 | if (isset($resultRaw['version']) && $this->isRealResult($resultRaw['version']) === true) { |
|
| 108 | $browser->getVersion()->setComplete($resultRaw['version']); |
|
| 109 | } |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * |
|