cweagans\Composer\Patches::isPatchingEnabled PHP Method

isPatchingEnabled() protected method

Checks if the root package enables patching.
protected isPatchingEnabled ( ) : boolean
return boolean Whether patching is enabled. Defaults to TRUE.
    protected function isPatchingEnabled()
    {
        $extra = $this->composer->getPackage()->getExtra();
        if (empty($extra['patches']) && empty($extra['patches-ignore']) && !isset($extra['patches-file'])) {
            // The root package has no patches of its own, so only allow patching if
            // it has specifically opted in.
            return isset($extra['enable-patching']) ? $extra['enable-patching'] : FALSE;
        } else {
            return TRUE;
        }
    }