original_string: protected function basePath(string $path): string
      {
          // This set of preg_match would filter ftp' user is not accessing
          // exact path as path('public'), in most shared hosting ftp' user
          // would only gain access to it's /home/username directory.
          if (\preg_match('/^\/(home)\/([a-zA-Z0-9]+)\/(.*)$/', $path, $matches)) {
              $path = '/'.\ltrim($matches[3], '/');
          }
  
          return $path;
      }
code: protected function basePath(string $path): string
      {
          // This set of preg_match would filter ftp' user is not accessing
          // exact path as path('public'), in most shared hosting ftp' user
          // would only gain access to it's /home/username directory.
          if (\preg_match('/^\/(home)\/([a-zA-Z0-9]+)\/(.*)$/', $path, $matches)) {
              $path = '/'.\ltrim($matches[3], '/');
          }
  
          return $path;
      }
code_tokens: protected function basePath ( string $ path ) : string { // This set of preg_match would filter ftp' user is not accessing // exact path as path('public'), in most shared hosting ftp' user // would only gain access to it's /home/username directory. if ( \ preg_match ( '/^\/(home)\/([a-zA-Z0-9]+)\/(.*)$/' , $ path , $ matches ) ) { $ path = '/' . \ ltrim ( $ matches [ 3 ] , '/' ) ; } return $ path ; }
docstring: Get base path for FTP.
  
  @param  string  $path
  
  @return string
docstring_tokens: Get base path for FTP .