original_string: protected function checkWordPressInstallation()
      {
          $defaultWpInstallDir = $this->plugin->getRootDirectory() . '/wordpress';
          $wpInstallDir = $this->getComposerConfigurator()->getWordPressInstallDirectory();
          
          if (file_exists($defaultWpInstallDir) && is_dir($defaultWpInstallDir)) {
              if (! is_dir($wpInstallDir)) {
                  if (file_exists($wpInstallDir)) {
                      unlink($wpInstallDir);
                  }
                  
                  rename($defaultWpInstallDir, $wpInstallDir);
              } else {
                  rmdir($defaultWpInstallDir);
              }
          }
      }
code: protected function checkWordPressInstallation()
      {
          $defaultWpInstallDir = $this->plugin->getRootDirectory() . '/wordpress';
          $wpInstallDir = $this->getComposerConfigurator()->getWordPressInstallDirectory();
          
          if (file_exists($defaultWpInstallDir) && is_dir($defaultWpInstallDir)) {
              if (! is_dir($wpInstallDir)) {
                  if (file_exists($wpInstallDir)) {
                      unlink($wpInstallDir);
                  }
                  
                  rename($defaultWpInstallDir, $wpInstallDir);
              } else {
                  rmdir($defaultWpInstallDir);
              }
          }
      }
code_tokens: protected function checkWordPressInstallation ( ) { $ defaultWpInstallDir = $ this -> plugin -> getRootDirectory ( ) . '/wordpress' ; $ wpInstallDir = $ this -> getComposerConfigurator ( ) -> getWordPressInstallDirectory ( ) ; if ( file_exists ( $ defaultWpInstallDir ) && is_dir ( $ defaultWpInstallDir ) ) { if ( ! is_dir ( $ wpInstallDir ) ) { if ( file_exists ( $ wpInstallDir ) ) { unlink ( $ wpInstallDir ) ; } rename ( $ defaultWpInstallDir , $ wpInstallDir ) ; } else { rmdir ( $ defaultWpInstallDir ) ; } } }
docstring: Check if WordPress is installed in the correct directory,
  and move it there if it is not.
  
  @return  void
docstring_tokens: Check if WordPress is installed in the correct directory and move it there if it is not .