private function isReference(&$value): array
  {
    switch (true)
    {
      case is_bool($value):
      case is_null($value):
      case is_int($value):
      case is_string($value):
      case is_double($value):
      case is_resource($value):
        $ref = $this->testSeen($value);
        break;

      case is_object($value):
        $ref = $this->testSeenObject($value);
        break;

      case is_array($value):
        $ref = $this->testSeenArray($value);
        break;

      default:
        throw new FallenException('type', gettype($value));
    }

    $id = ($ref===null) ? sizeof($this->seen) - 1 : null;

    return [$id, $ref];
  }