Setter is not actually a setter
Closed this issue · 2 comments
jkujawski commented
Currently setUserAgent is not actually a setter, because it just returns userAgent.
/**
* Set the user agent.
*
* @param string $userAgent
*/
public function setUserAgent($userAgent)
{
if (is_null($userAgent)) {
foreach ($this->getUaHttpHeaders() as $altHeader) {
if (isset($this->httpHeaders[$altHeader])) {
$userAgent .= $this->httpHeaders[$altHeader].' ';
}
}
}
return $userAgent;
}
Shouldn't it set $this->userAgent
?
JayBizzle commented
Yes, I can see where you are coming from.
Would you like to suggest an improvement via PR?
Thanks 👍