original_string: private function createCommand()
      {
          $cmd = ['create' => $this->collectionName];
  
          foreach (['autoIndexId', 'capped', 'flags', 'max', 'maxTimeMS', 'size', 'validationAction', 'validationLevel'] as $option) {
              if (isset($this->options[$option])) {
                  $cmd[$option] = $this->options[$option];
              }
          }
  
          foreach (['collation', 'indexOptionDefaults', 'storageEngine', 'validator'] as $option) {
              if (isset($this->options[$option])) {
                  $cmd[$option] = (object) $this->options[$option];
              }
          }
  
          return new Command($cmd);
      }
code: private function createCommand()
      {
          $cmd = ['create' => $this->collectionName];
  
          foreach (['autoIndexId', 'capped', 'flags', 'max', 'maxTimeMS', 'size', 'validationAction', 'validationLevel'] as $option) {
              if (isset($this->options[$option])) {
                  $cmd[$option] = $this->options[$option];
              }
          }
  
          foreach (['collation', 'indexOptionDefaults', 'storageEngine', 'validator'] as $option) {
              if (isset($this->options[$option])) {
                  $cmd[$option] = (object) $this->options[$option];
              }
          }
  
          return new Command($cmd);
      }
code_tokens: private function createCommand ( ) { $ cmd = [ 'create' => $ this -> collectionName ] ; foreach ( [ 'autoIndexId' , 'capped' , 'flags' , 'max' , 'maxTimeMS' , 'size' , 'validationAction' , 'validationLevel' ] as $ option ) { if ( isset ( $ this -> options [ $ option ] ) ) { $ cmd [ $ option ] = $ this -> options [ $ option ] ; } } foreach ( [ 'collation' , 'indexOptionDefaults' , 'storageEngine' , 'validator' ] as $ option ) { if ( isset ( $ this -> options [ $ option ] ) ) { $ cmd [ $ option ] = ( object ) $ this -> options [ $ option ] ; } } return new Command ( $ cmd ) ; }
docstring: Create the create command.
  
  @return Command
docstring_tokens: Create the create command .