original_string: public function has(int $idx, $expectedTag = null): bool
      {
          if (!isset($this->_elements[$idx])) {
              return false;
          }
          if (isset($expectedTag)) {
              if (!$this->_elements[$idx]->isType($expectedTag)) {
                  return false;
              }
          }
          return true;
      }
code: public function has(int $idx, $expectedTag = null): bool
      {
          if (!isset($this->_elements[$idx])) {
              return false;
          }
          if (isset($expectedTag)) {
              if (!$this->_elements[$idx]->isType($expectedTag)) {
                  return false;
              }
          }
          return true;
      }
code_tokens: public function has ( int $ idx , $ expectedTag = null ) : bool { if ( ! isset ( $ this -> _elements [ $ idx ] ) ) { return false ; } if ( isset ( $ expectedTag ) ) { if ( ! $ this -> _elements [ $ idx ] -> isType ( $ expectedTag ) ) { return false ; } } return true ; }
docstring: Check whether the structure has an element at the given index, optionally
  satisfying given tag expectation.
  
  @param int $idx Index 0..n
  @param int|null $expectedTag Optional type tag expectation
  @return bool
docstring_tokens: Check whether the structure has an element at the given index optionally satisfying given tag expectation .