ThaDafinser / UserAgentParser

UserAgent parsing done right
http://useragent.mkf.solutions/
MIT License
246 stars 47 forks source link

Change isRealResult() to getRealResult() #80

Closed ThaDafinser closed 8 years ago

ThaDafinser commented 8 years ago

Instead of doing this

if ($this->isRealResult($deviceRaw->model, 'device', 'model') === true) {
    $device->setModel($deviceRaw->model);
}

Do this and return null if it's not a valid value

$device->setModel($this->getRealResult($deviceRaw->model, 'device', 'model'));

There are some providers where the value is not always available - there we still need a isset() if check before that

ThaDafinser commented 8 years ago

https://github.com/ThaDafinser/UserAgentParser/pull/88