original_string: protected function checkDumpDir()
      {
  
          if (!is_dir($this->dump_dir)) {
              mkdir($this->dump_dir, 0700, true);
          }
  
          foreach (\range($this->max_version, 1) as $version) {
              $dir = $this->dump_dir . $version;
  
              if (is_dir($dir)) {
  
                  if ($version == $this->max_version) {
                      $this->recursiveDelete($dir, 1);
                      $this->log('Deleting backup ' . $this->max_version);
                  } else {
                      $new_version = $version + 1;
                      rename($dir, $this->dump_dir . $new_version);
                      $this->log('Moving backup ' . $version . ' to version ' . $new_version);
                  }
              }
          }
  
          if (!is_dir($this->dump_dir . '1')) {
              mkdir($this->dump_dir . '1', 0700, true);
          }
      }
code: protected function checkDumpDir()
      {
  
          if (!is_dir($this->dump_dir)) {
              mkdir($this->dump_dir, 0700, true);
          }
  
          foreach (\range($this->max_version, 1) as $version) {
              $dir = $this->dump_dir . $version;
  
              if (is_dir($dir)) {
  
                  if ($version == $this->max_version) {
                      $this->recursiveDelete($dir, 1);
                      $this->log('Deleting backup ' . $this->max_version);
                  } else {
                      $new_version = $version + 1;
                      rename($dir, $this->dump_dir . $new_version);
                      $this->log('Moving backup ' . $version . ' to version ' . $new_version);
                  }
              }
          }
  
          if (!is_dir($this->dump_dir . '1')) {
              mkdir($this->dump_dir . '1', 0700, true);
          }
      }
code_tokens: protected function checkDumpDir ( ) { if ( ! is_dir ( $ this -> dump_dir ) ) { mkdir ( $ this -> dump_dir , 0700 , true ) ; } foreach ( \ range ( $ this -> max_version , 1 ) as $ version ) { $ dir = $ this -> dump_dir . $ version ; if ( is_dir ( $ dir ) ) { if ( $ version == $ this -> max_version ) { $ this -> recursiveDelete ( $ dir , 1 ) ; $ this -> log ( 'Deleting backup ' . $ this -> max_version ) ; } else { $ new_version = $ version + 1 ; rename ( $ dir , $ this -> dump_dir . $ new_version ) ; $ this -> log ( 'Moving backup ' . $ version . ' to version ' . $ new_version ) ; } } } if ( ! is_dir ( $ this -> dump_dir . '1' ) ) { mkdir ( $ this -> dump_dir . '1' , 0700 , true ) ; } }
docstring: check to make sure dump directory exists and if not create it
docstring_tokens: check to make sure dump directory exists and if not create it