You are here

class Revealer 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

Basic prophecies revealer.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

Expanded class hierarchy of Revealer

1 file declares its use of Revealer
Prophet.php in vendor/phpspec/prophecy/src/Prophecy/Prophet.php

File

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

Namespace

Prophecy\Prophecy
View source
class Revealer implements RevealerInterface {

  /**
   * Unwraps value(s).
   *
   * @param mixed $value
   *
   * @return mixed
   */
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Revealer::reveal public function Unwraps value(s). Overrides RevealerInterface::reveal