Pagekit\Installer\Package\PackageManager::getScripts PHP Method

getScripts() protected method

protected getScripts ( array $package, string $current = null ) : PackageScripts
$package array
$current string
return PackageScripts
    protected function getScripts($package, $current = null)
    {
        if (!($scripts = $package->get('extra.scripts'))) {
            return new PackageScripts(null, $current);
        }
        if (!($path = $package->get('path'))) {
            throw new \RuntimeException(__('Package path is missing.'));
        }
        return new PackageScripts($path . '/' . $scripts, $current);
    }