private static function getProjectActivation(PackageInterface $package, array $configPackages)
    {
        $name = $package->getName();
        $value = null;

        foreach ($configPackages as $pattern => $activation) {
            if (\is_int($pattern) && \is_string($activation)) {
                $pattern = $activation;
                $activation = true;
            }

            if ((0 === strpos($pattern, '/') && preg_match($pattern, $name)) || fnmatch($pattern, $name)) {
                $value = $activation;

                break;
            }
        }

        return $value;
    }
private static function getProjectActivation(PackageInterface $package, array $configPackages)
    {
        $name = $package->getName();
        $value = null;

        foreach ($configPackages as $pattern => $activation) {
            if (\is_int($pattern) && \is_string($activation)) {
                $pattern = $activation;
                $activation = true;
            }

            if ((0 === strpos($pattern, '/') && preg_match($pattern, $name)) || fnmatch($pattern, $name)) {
                $value = $activation;

                break;
            }
        }

        return $value;
    }
private static function getProjectActivation ( PackageInterface $ package , array $ configPackages ) { $ name = $ package -> getName ( ) ; $ value = null ; foreach ( $ configPackages as $ pattern => $ activation ) { if ( \ is_int ( $ pattern ) && \ is_string ( $ activation ) ) { $ pattern = $ activation ; $ activation = true ; } if ( ( 0 === strpos ( $ pattern , '/' ) && preg_match ( $ pattern , $ name ) ) || fnmatch ( $ pattern , $ name ) ) { $ value = $ activation ; break ; } } return $ value ; }
Get the activation of the package defined in the project config.

@param PackageInterface $package        The package
@param array            $configPackages The packages defined in config

@return null|bool returns NULL, if the package isn't defined in the project config
Get the activation of the package defined in the project config .