getPackageUsage() public method

Return usage of the current package
public getPackageUsage ( Composer\Package\PackageInterface $package ) : array
$package Composer\Package\PackageInterface
return array
 /**
  * Detect if other project use the dependency by using the "packages.json" file
  *
  * @param PackageInterface $package
  *
  * @return bool
  */
 protected function isSourceDirUnused(PackageInterface $package)
 {
     $usageData = $this->packageDataManager->getPackageUsage($package);
     return sizeof($usageData) <= 1;
 }