protected function removeAssets(PackageInterface $package)
    {
        $assets = $this->getPackageAssetsDir($package);
        if (!$assets) {
            return;
        }

        $target = $this->getAssetsInstallPath($package);
        if (file_exists($target)) {
            $this->io->write(
                sprintf('  - Removing <info>%s</info> assets from <info>%s</info>',
                    $package->getPrettyName(),
                    str_replace(dirname($this->assets_dir) . '/', '', $target)
                )
            );
            $this->filesystem->remove($target);
            Dispatch::unregisterPackage($package, $this);
            $this->io->write('');
        } else {
            Error::thrower(
                sprintf('Unable to find assets from package "%s"', $package->getPrettyName()),
                '\InvalidArgumentException', __CLASS__, __METHOD__, __LINE__
            );
        }
    }
protected function removeAssets(PackageInterface $package)
    {
        $assets = $this->getPackageAssetsDir($package);
        if (!$assets) {
            return;
        }

        $target = $this->getAssetsInstallPath($package);
        if (file_exists($target)) {
            $this->io->write(
                sprintf('  - Removing <info>%s</info> assets from <info>%s</info>',
                    $package->getPrettyName(),
                    str_replace(dirname($this->assets_dir) . '/', '', $target)
                )
            );
            $this->filesystem->remove($target);
            Dispatch::unregisterPackage($package, $this);
            $this->io->write('');
        } else {
            Error::thrower(
                sprintf('Unable to find assets from package "%s"', $package->getPrettyName()),
                '\InvalidArgumentException', __CLASS__, __METHOD__, __LINE__
            );
        }
    }
protected function removeAssets ( PackageInterface $ package ) { $ assets = $ this -> getPackageAssetsDir ( $ package ) ; if ( ! $ assets ) { return ; } $ target = $ this -> getAssetsInstallPath ( $ package ) ; if ( file_exists ( $ target ) ) { $ this -> io -> write ( sprintf ( '  - Removing <info>%s</info> assets from <info>%s</info>' , $ package -> getPrettyName ( ) , str_replace ( dirname ( $ this -> assets_dir ) . '/' , '' , $ target ) ) ) ; $ this -> filesystem -> remove ( $ target ) ; Dispatch :: unregisterPackage ( $ package , $ this ) ; $ this -> io -> write ( '' ) ; } else { Error :: thrower ( sprintf ( 'Unable to find assets from package "%s"' , $ package -> getPrettyName ( ) ) , '\InvalidArgumentException' , __CLASS__ , __METHOD__ , __LINE__ ) ; } }
Remove the assets of a package

@param \Composer\Package\PackageInterface $package
@return bool
Remove the assets of a package