original_string: protected function getVendorAndFolderName($url)
      {
          if (Str::contains($url, '@')) {
              $vendorAndPackage = explode(':', $url);
  
              $vendorAndPackage = explode('/', $vendorAndPackage[1]);
  
              return [
                  $vendorAndPackage[0],
                  Str::replaceLast('.git', '', $vendorAndPackage[1]),
              ];
          }
  
          $urlParts = explode('/', $url);
  
          return [$urlParts[3], $urlParts[4]];
      }
code: protected function getVendorAndFolderName($url)
      {
          if (Str::contains($url, '@')) {
              $vendorAndPackage = explode(':', $url);
  
              $vendorAndPackage = explode('/', $vendorAndPackage[1]);
  
              return [
                  $vendorAndPackage[0],
                  Str::replaceLast('.git', '', $vendorAndPackage[1]),
              ];
          }
  
          $urlParts = explode('/', $url);
  
          return [$urlParts[3], $urlParts[4]];
      }
code_tokens: protected function getVendorAndFolderName ( $ url ) { if ( Str :: contains ( $ url , '@' ) ) { $ vendorAndPackage = explode ( ':' , $ url ) ; $ vendorAndPackage = explode ( '/' , $ vendorAndPackage [ 1 ] ) ; return [ $ vendorAndPackage [ 0 ] , Str :: replaceLast ( '.git' , '' , $ vendorAndPackage [ 1 ] ) , ] ; } $ urlParts = explode ( '/' , $ url ) ; return [ $ urlParts [ 3 ] , $ urlParts [ 4 ] ] ; }
docstring: Get vendor and package folder name.
  
  @param $url
  
  @return array
docstring_tokens: Get vendor and package folder name .