protected function isPatchingEnabled()
    {
        $enabled = true;

        $has_no_patches = empty($extra['patches']);
        $has_no_patches_file = ($this->getConfig('patches-file') === '');
        $patching_disabled = $this->getConfig('disable-patching');

        if ($patching_disabled || !($has_no_patches && $has_no_patches_file)) {
            $enabled = false;
        }

        return $enabled;
    }