original_string: public function setIn($keys, $value)
      {
          $lastKey = array_shift($keys);
          if (count($keys) > 0 && !isset($this->$lastKey->{$keys[0]})) {
              throw new \RuntimeException(sprintf("Key '%s->%s' does not exist.", $lastKey, $keys[0]));
          }
          if (count($keys) > 0 && $this->$lastKey instanceof Map) {
              return $this->merge(new self(array($lastKey => $this->$lastKey->setIn($keys, $value))));
          }
          return $this->merge(new self(array($lastKey => $value)));
      }
code: public function setIn($keys, $value)
      {
          $lastKey = array_shift($keys);
          if (count($keys) > 0 && !isset($this->$lastKey->{$keys[0]})) {
              throw new \RuntimeException(sprintf("Key '%s->%s' does not exist.", $lastKey, $keys[0]));
          }
          if (count($keys) > 0 && $this->$lastKey instanceof Map) {
              return $this->merge(new self(array($lastKey => $this->$lastKey->setIn($keys, $value))));
          }
          return $this->merge(new self(array($lastKey => $value)));
      }
code_tokens: public function setIn ( $ keys , $ value ) { $ lastKey = array_shift ( $ keys ) ; if ( count ( $ keys ) > 0 && ! isset ( $ this -> $ lastKey -> { $ keys [ 0 ] } ) ) { throw new \ RuntimeException ( sprintf ( "Key '%s->%s' does not exist." , $ lastKey , $ keys [ 0 ] ) ) ; } if ( count ( $ keys ) > 0 && $ this -> $ lastKey instanceof Map ) { return $ this -> merge ( new self ( array ( $ lastKey => $ this -> $ lastKey -> setIn ( $ keys , $ value ) ) ) ) ; } return $ this -> merge ( new self ( array ( $ lastKey => $ value ) ) ) ; }
docstring: set a value in a nested map
  @param array $keys
  @param mixed $value
  @return Map
docstring_tokens: set a value in a nested map