Skip to content

Commit

Permalink
rewrite value object
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Nov 27, 2018
1 parent 68790fc commit fd4848b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/Domain/Value/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __construct()
$this->__INITIALIZED__ = true;
}

public function __get(string $key)
public function __get(string $key) // : mixed
{
return $this->$key;
}
Expand All @@ -27,7 +27,7 @@ public function __set(string $key, $val) : void
throw $this->immutableException();
}

public function __isset(string $key)
public function __isset(string $key) : bool
{
return isset($this->$key);
}
Expand All @@ -39,12 +39,10 @@ public function __unset(string $key) : void

public function __debugInfo() : array
{
$info = get_object_vars($this);
unset($info['__INITIALIZED__']);
return $info;
return $this->getArrayCopy();
}

public function getArrayCopy()
public function getArrayCopy() : array
{
$copy = get_object_vars($this);
unset($copy['__INITIALIZED__']);
Expand Down

0 comments on commit fd4848b

Please sign in to comment.