original_string: private function ensureFilesIndex()
      {
          foreach ($this->filesCollection->listIndexes() as $index) {
              if ($index->getKey() === ['filename' => 1, 'uploadDate' => 1]) {
                  return;
              }
          }
  
          $this->filesCollection->createIndex(['filename' => 1, 'uploadDate' => 1]);
      }
code: private function ensureFilesIndex()
      {
          foreach ($this->filesCollection->listIndexes() as $index) {
              if ($index->getKey() === ['filename' => 1, 'uploadDate' => 1]) {
                  return;
              }
          }
  
          $this->filesCollection->createIndex(['filename' => 1, 'uploadDate' => 1]);
      }
code_tokens: private function ensureFilesIndex ( ) { foreach ( $ this -> filesCollection -> listIndexes ( ) as $ index ) { if ( $ index -> getKey ( ) === [ 'filename' => 1 , 'uploadDate' => 1 ] ) { return ; } } $ this -> filesCollection -> createIndex ( [ 'filename' => 1 , 'uploadDate' => 1 ] ) ; }
docstring: Create an index on the files collection if it does not already exist.
docstring_tokens: Create an index on the files collection if it does not already exist .