protected function findBundleFiles(PackageInterface $package)
    {
        $installPath = $this->composer->getInstallationManager()->getInstallPath($package);

        $autoload = $package->getAutoload();
        if (isset($autoload['psr-0'])) {
            $installPath .= '/' . current($autoload['psr-0']);
        }
        if (isset($autoload['psr-4'])) {
            $installPath .= '/' . current($autoload['psr-4']);
        }

        return glob(rtrim($installPath, '/') . '/*Bundle.php');
    }