Skip to content

Commit

Permalink
Fix Requestor mutation bug to allow for extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Thomas committed Jun 12, 2017
1 parent b49cae6 commit 4cf14ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Requestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getIdentifiationByClassName(string $class_name): ?Identification
*/
public function withUserId(int $id): self
{
$mutee = new self($this->getIdentifications());
$mutee = new static($this->getIdentifications());
$mutee->registerIdentification(new Identification\UserId($id));

return $mutee;
Expand All @@ -75,7 +75,7 @@ public function withUserId(int $id): self
*/
public function withIpAddress(string $ip_address): self
{
$mutee = new self($this->getIdentifications());
$mutee = new static($this->getIdentifications());
$mutee->registerIdentification(new Identification\IpAddress($ip_address));

return $mutee;
Expand All @@ -88,7 +88,7 @@ public function withIpAddress(string $ip_address): self
*/
public function withStringHash(string $hash): self
{
$mutee = new self($this->getIdentifications());
$mutee = new static($this->getIdentifications());
$mutee->registerIdentification(new Identification\StringHash($hash));

return $mutee;
Expand All @@ -101,7 +101,7 @@ public function withStringHash(string $hash): self
*/
public function withRequest(RequestInterface $request): self
{
$mutee = new self($this->getIdentifications());
$mutee = new static($this->getIdentifications());
$mutee->registerIdentification(Identification\HttpHeader::createFromRequest($request));

return $mutee;
Expand All @@ -114,7 +114,7 @@ public function withRequest(RequestInterface $request): self
*/
public function withEnvironment(string $environment): self
{
$mutee = new self($this->getIdentifications());
$mutee = new static($this->getIdentifications());
$mutee->registerIdentification(new Identification\Environment($environment));

return $mutee;
Expand Down

0 comments on commit 4cf14ea

Please sign in to comment.