You are here

public function Revealer::reveal in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php \Prophecy\Prophecy\Revealer::reveal()

Unwraps value(s).

Parameters

mixed $value:

Return value

mixed

Overrides RevealerInterface::reveal

File

vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php, line 28

Class

Revealer
Basic prophecies revealer.

Namespace

Prophecy\Prophecy

Code

public function reveal($value) {
  if (is_array($value)) {
    return array_map(array(
      $this,
      __FUNCTION__,
    ), $value);
  }
  if (!is_object($value)) {
    return $value;
  }
  if ($value instanceof ProphecyInterface) {
    $value = $value
      ->reveal();
  }
  return $value;
}