original_string: private static function _decodeIndefiniteLength(string $data, int &$offset): ElementBase
      {
          $idx = $offset;
          $elements = [];
          $end = strlen($data);
          while (true) {
              if ($idx >= $end) {
                  throw new DecodeException(
                      'Unexpected end of data while decoding indefinite length structure.');
              }
              $el = Element::fromDER($data, $idx);
              if ($el->isType(self::TYPE_EOC)) {
                  break;
              }
              $elements[] = $el;
          }
          $offset = $idx;
          $type = new static(...$elements);
          $type->_indefiniteLength = true;
          return $type;
      }
code: private static function _decodeIndefiniteLength(string $data, int &$offset): ElementBase
      {
          $idx = $offset;
          $elements = [];
          $end = strlen($data);
          while (true) {
              if ($idx >= $end) {
                  throw new DecodeException(
                      'Unexpected end of data while decoding indefinite length structure.');
              }
              $el = Element::fromDER($data, $idx);
              if ($el->isType(self::TYPE_EOC)) {
                  break;
              }
              $elements[] = $el;
          }
          $offset = $idx;
          $type = new static(...$elements);
          $type->_indefiniteLength = true;
          return $type;
      }
code_tokens: private static function _decodeIndefiniteLength ( string $ data , int & $ offset ) : ElementBase { $ idx = $ offset ; $ elements = [ ] ; $ end = strlen ( $ data ) ; while ( true ) { if ( $ idx >= $ end ) { throw new DecodeException ( 'Unexpected end of data while decoding indefinite length structure.' ) ; } $ el = Element :: fromDER ( $ data , $ idx ) ; if ( $ el -> isType ( self :: TYPE_EOC ) ) { break ; } $ elements [ ] = $ el ; } $ offset = $ idx ; $ type = new static ( ... $ elements ) ; $ type -> _indefiniteLength = true ; return $ type ; }
docstring: Decode elements for an indefinite length.
  
  @param string $data DER data
  @param int $offset Offset to data
  @throws DecodeException
  @return ElementBase
docstring_tokens: Decode elements for an indefinite length .