<commit_before><?php
/**
 * @package     Mautic
 * @copyright   2014 Mautic Contributors. All rights reserved.
 * @author      Mautic
 * @link        http://mautic.org
 * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

namespace Mautic\AddonBundle\Bundle;

use Mautic\AddonBundle\Entity\Addon;
use Mautic\CoreBundle\Factory\MauticFactory;
use Mautic\AddonBundle\Helper\AddonHelper;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
 * Base Bundle class which should be extended by addon bundles
 */
abstract class AddonBundleBase extends Bundle
{
    /**
     * Checks if the bundle is enabled
     *
     * @return bool
     */
    public function isEnabled()
    {
        /** @var \Mautic\AddonBundle\Helper\AddonHelper $helper */
        $helper = $this->container->get('mautic.factory')->getHelper('addon');
        return $helper->isEnabled($this->getName());
    }

    /**
     * Called by AddonController::reloadAction when adding a new addon that's not already installed
     *
     * @param MauticFactory $factory
     */
    static public function onInstall(MauticFactory $factory)
    {

    }

    /**
     * Called by AddonController::reloadAction when the addon version does not match what's installed
     *
     * @param Addon         $addon
     * @param MauticFactory $factory
     */
    static public function onUpdate(Addon $addon, MauticFactory $factory)
    {

    }

    /**
     * Called by AddonController::reloadAction when an addon is uninstalled
     *
     * @param Addon         $addon
     * @param MauticFactory $factory
     */
    static public function onUninstall(Addon $addon, MauticFactory $factory)
    {

    }
}
<commit_msg>Just a docblock change with a @todo and note that onUninstall is not implemented yet<commit_after><?php
/**
 * @package     Mautic
 * @copyright   2014 Mautic Contributors. All rights reserved.
 * @author      Mautic
 * @link        http://mautic.org
 * @license     GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

namespace Mautic\AddonBundle\Bundle;

use Mautic\AddonBundle\Entity\Addon;
use Mautic\CoreBundle\Factory\MauticFactory;
use Mautic\AddonBundle\Helper\AddonHelper;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
 * Base Bundle class which should be extended by addon bundles
 */
abstract class AddonBundleBase extends Bundle
{
    /**
     * Checks if the bundle is enabled
     *
     * @return bool
     */
    public function isEnabled()
    {
        /** @var \Mautic\AddonBundle\Helper\AddonHelper $helper */
        $helper = $this->container->get('mautic.factory')->getHelper('addon');
        return $helper->isEnabled($this->getName());
    }

    /**
     * Called by AddonController::reloadAction when adding a new addon that's not already installed
     *
     * @param MauticFactory $factory
     */
    static public function onInstall(MauticFactory $factory)
    {

    }

    /**
     * Called by AddonController::reloadAction when the addon version does not match what's installed
     *
     * @param Addon         $addon
     * @param MauticFactory $factory
     */
    static public function onUpdate(Addon $addon, MauticFactory $factory)
    {

    }

    /**
     * Called by AddonController::reloadAction when an addon is uninstalled
     *
     * @todo NOT IMPLEMENTED YET IN THE ADDON MANAGER
     *
     * @param Addon         $addon
     * @param MauticFactory $factory
     */
    static public function onUninstall(Addon $addon, MauticFactory $factory)
    {

    }
}

{'fraction_non_alphanumeric': 0.10466439135381114, 'fraction_numerical': 0.003981797497155859, 'mean_word_length': 2.698212407991588, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6339349', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1062, 'n_words': 274}