original_string: private function createQueryOptions()
      {
          $options = [];
  
          if (isset($this->options['cursorType'])) {
              if ($this->options['cursorType'] === self::TAILABLE) {
                  $options['tailable'] = true;
              }
              if ($this->options['cursorType'] === self::TAILABLE_AWAIT) {
                  $options['tailable'] = true;
                  $options['awaitData'] = true;
              }
          }
  
          foreach (['allowPartialResults', 'batchSize', 'comment', 'hint', 'limit', 'maxAwaitTimeMS', 'maxScan', 'maxTimeMS', 'noCursorTimeout', 'oplogReplay', 'projection', 'readConcern', 'returnKey', 'showRecordId', 'skip', 'snapshot', 'sort'] as $option) {
              if (isset($this->options[$option])) {
                  $options[$option] = $this->options[$option];
              }
          }
  
          foreach (['collation', 'max', 'min'] as $option) {
              if (isset($this->options[$option])) {
                  $options[$option] = (object) $this->options[$option];
              }
          }
  
          $modifiers = empty($this->options['modifiers']) ? [] : (array) $this->options['modifiers'];
  
          if ( ! empty($modifiers)) {
              $options['modifiers'] = $modifiers;
          }
  
          return $options;
      }
code: private function createQueryOptions()
      {
          $options = [];
  
          if (isset($this->options['cursorType'])) {
              if ($this->options['cursorType'] === self::TAILABLE) {
                  $options['tailable'] = true;
              }
              if ($this->options['cursorType'] === self::TAILABLE_AWAIT) {
                  $options['tailable'] = true;
                  $options['awaitData'] = true;
              }
          }
  
          foreach (['allowPartialResults', 'batchSize', 'comment', 'hint', 'limit', 'maxAwaitTimeMS', 'maxScan', 'maxTimeMS', 'noCursorTimeout', 'oplogReplay', 'projection', 'readConcern', 'returnKey', 'showRecordId', 'skip', 'snapshot', 'sort'] as $option) {
              if (isset($this->options[$option])) {
                  $options[$option] = $this->options[$option];
              }
          }
  
          foreach (['collation', 'max', 'min'] as $option) {
              if (isset($this->options[$option])) {
                  $options[$option] = (object) $this->options[$option];
              }
          }
  
          $modifiers = empty($this->options['modifiers']) ? [] : (array) $this->options['modifiers'];
  
          if ( ! empty($modifiers)) {
              $options['modifiers'] = $modifiers;
          }
  
          return $options;
      }
code_tokens: private function createQueryOptions ( ) { $ options = [ ] ; if ( isset ( $ this -> options [ 'cursorType' ] ) ) { if ( $ this -> options [ 'cursorType' ] === self :: TAILABLE ) { $ options [ 'tailable' ] = true ; } if ( $ this -> options [ 'cursorType' ] === self :: TAILABLE_AWAIT ) { $ options [ 'tailable' ] = true ; $ options [ 'awaitData' ] = true ; } } foreach ( [ 'allowPartialResults' , 'batchSize' , 'comment' , 'hint' , 'limit' , 'maxAwaitTimeMS' , 'maxScan' , 'maxTimeMS' , 'noCursorTimeout' , 'oplogReplay' , 'projection' , 'readConcern' , 'returnKey' , 'showRecordId' , 'skip' , 'snapshot' , 'sort' ] as $ option ) { if ( isset ( $ this -> options [ $ option ] ) ) { $ options [ $ option ] = $ this -> options [ $ option ] ; } } foreach ( [ 'collation' , 'max' , 'min' ] as $ option ) { if ( isset ( $ this -> options [ $ option ] ) ) { $ options [ $ option ] = ( object ) $ this -> options [ $ option ] ; } } $ modifiers = empty ( $ this -> options [ 'modifiers' ] ) ? [ ] : ( array ) $ this -> options [ 'modifiers' ] ; if ( ! empty ( $ modifiers ) ) { $ options [ 'modifiers' ] = $ modifiers ; } return $ options ; }
docstring: Create options for the find query.
  
  Note that these are separate from the options for executing the command,
  which are created in createExecuteOptions().
  
  @return array
docstring_tokens: Create options for the find query .