original_string: public function getVendorAndPluginNames()
      {
          $plugins = [];
  
          $dirPath = plugins_path();
          if (!File::isDirectory($dirPath)) {
              return $plugins;
          }
  
          $it = new RecursiveIteratorIterator(
              new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)
          );
          $it->setMaxDepth(2);
          $it->rewind();
  
          while ($it->valid()) {
              if (($it->getDepth() > 1) && $it->isFile() && (strtolower($it->getFilename()) == "plugin.php")) {
                  $filePath = dirname($it->getPathname());
                  $pluginName = basename($filePath);
                  $vendorName = basename(dirname($filePath));
                  $plugins[$vendorName][$pluginName] = $filePath;
              }
  
              $it->next();
          }
  
          return $plugins;
      }
code: public function getVendorAndPluginNames()
      {
          $plugins = [];
  
          $dirPath = plugins_path();
          if (!File::isDirectory($dirPath)) {
              return $plugins;
          }
  
          $it = new RecursiveIteratorIterator(
              new RecursiveDirectoryIterator($dirPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS)
          );
          $it->setMaxDepth(2);
          $it->rewind();
  
          while ($it->valid()) {
              if (($it->getDepth() > 1) && $it->isFile() && (strtolower($it->getFilename()) == "plugin.php")) {
                  $filePath = dirname($it->getPathname());
                  $pluginName = basename($filePath);
                  $vendorName = basename(dirname($filePath));
                  $plugins[$vendorName][$pluginName] = $filePath;
              }
  
              $it->next();
          }
  
          return $plugins;
      }
code_tokens: public function getVendorAndPluginNames ( ) { $ plugins = [ ] ; $ dirPath = plugins_path ( ) ; if ( ! File :: isDirectory ( $ dirPath ) ) { return $ plugins ; } $ it = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( $ dirPath , RecursiveDirectoryIterator :: FOLLOW_SYMLINKS ) ) ; $ it -> setMaxDepth ( 2 ) ; $ it -> rewind ( ) ; while ( $ it -> valid ( ) ) { if ( ( $ it -> getDepth ( ) > 1 ) && $ it -> isFile ( ) && ( strtolower ( $ it -> getFilename ( ) ) == "plugin.php" ) ) { $ filePath = dirname ( $ it -> getPathname ( ) ) ; $ pluginName = basename ( $ filePath ) ; $ vendorName = basename ( dirname ( $ filePath ) ) ; $ plugins [ $ vendorName ] [ $ pluginName ] = $ filePath ; } $ it -> next ( ) ; } return $ plugins ; }
docstring: Returns a 2 dimensional array of vendors and their plugins.
docstring_tokens: Returns a 2 dimensional array of vendors and their plugins .