original_string: public function getPackagesThatDependOnPackage($slug)
      {
          $plugins = $this->getInstalledPlugins();
          $themes = $this->getInstalledThemes();
          $packages = array_merge($plugins->toArray(), $themes->toArray());
  
          $dependent_packages = [];
  
          foreach ($packages as $package_name => $package) {
              if (isset($package['dependencies'])) {
                  foreach ($package['dependencies'] as $dependency) {
                      if (is_array($dependency) && isset($dependency['name'])) {
                          $dependency = $dependency['name'];
                      }
  
                      if ($dependency === $slug) {
                          $dependent_packages[] = $package_name;
                      }
                  }
              }
          }
  
          return $dependent_packages;
      }
code: public function getPackagesThatDependOnPackage($slug)
      {
          $plugins = $this->getInstalledPlugins();
          $themes = $this->getInstalledThemes();
          $packages = array_merge($plugins->toArray(), $themes->toArray());
  
          $dependent_packages = [];
  
          foreach ($packages as $package_name => $package) {
              if (isset($package['dependencies'])) {
                  foreach ($package['dependencies'] as $dependency) {
                      if (is_array($dependency) && isset($dependency['name'])) {
                          $dependency = $dependency['name'];
                      }
  
                      if ($dependency === $slug) {
                          $dependent_packages[] = $package_name;
                      }
                  }
              }
          }
  
          return $dependent_packages;
      }
code_tokens: public function getPackagesThatDependOnPackage ( $ slug ) { $ plugins = $ this -> getInstalledPlugins ( ) ; $ themes = $ this -> getInstalledThemes ( ) ; $ packages = array_merge ( $ plugins -> toArray ( ) , $ themes -> toArray ( ) ) ; $ dependent_packages = [ ] ; foreach ( $ packages as $ package_name => $ package ) { if ( isset ( $ package [ 'dependencies' ] ) ) { foreach ( $ package [ 'dependencies' ] as $ dependency ) { if ( is_array ( $ dependency ) && isset ( $ dependency [ 'name' ] ) ) { $ dependency = $ dependency [ 'name' ] ; } if ( $ dependency === $ slug ) { $ dependent_packages [ ] = $ package_name ; } } } } return $ dependent_packages ; }
docstring: Return the list of packages that have the passed one as dependency
  
  @param string $slug The slug name of the package
  
  @return array
docstring_tokens: Return the list of packages that have the passed one as dependency