<commit_before><?php

/**
 * Manage redirects
 *
 * @package     Nails
 * @subpackage  module-redirect
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */

namespace Nails\Admin\Redirect;

use Nails\Factory;
use Nails\Admin\Helper;
use Nails\Redirect\Controller\BaseAdmin;

class Redirect extends BaseAdmin
{
    /**
     * Announces this controller's navGroups
     * @return stdClass
     */
    public static function announce()
    {
        if (userHasPermission('admin:redirect:redirect:manage')) {

            $navGroup = Factory::factory('Nav', 'nailsapp/module-admin');
            $navGroup->setLabel('Redirects');
            $navGroup->setIcon('fa-arrow-circle-o-right');
            $navGroup->addAction('Manage Redirects');

            return $navGroup;
        }
    }

    // --------------------------------------------------------------------------

    /**
     * Returns an array of extra permissions for this controller
     * @return array
     */
    public static function permissions()
    {
        $permissions = parent::permissions();

        $permissions['manage'] = 'Can manage redirects';

        return $permissions;
    }

    // --------------------------------------------------------------------------
<commit_msg>Naming convention updates<commit_after><?php

/**
 * Manage redirects
 *
 * @package     Nails
 * @subpackage  module-redirect
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */

namespace Nails\Admin\Redirect;

use Nails\Factory;
use Nails\Admin\Helper;
use Nails\Redirect\Controller\BaseAdmin;

class Redirect extends BaseAdmin
{
    /**
     * Announces this controller's navGroups
     * @return stdClass
     */
    public static function announce()
    {
        if (userHasPermission('admin:redirect:redirect:manage')) {

            $oNavGroup = Factory::factory('Nav', 'nailsapp/module-admin');
            $oNavGroup->setLabel('Redirects');
            $oNavGroup->setIcon('fa-arrow-circle-o-right');
            $oNavGroup->addAction('Manage Redirects');

            return $oNavGroup;
        }
    }

    // --------------------------------------------------------------------------

    /**
     * Returns an array of extra permissions for this controller
     * @return array
     */
    public static function permissions()
    {
        $permissions = parent::permissions();

        $permissions['manage'] = 'Can manage redirects';

        return $permissions;
    }

    // --------------------------------------------------------------------------

{'fraction_non_alphanumeric': 0.22317596566523606, 'fraction_numerical': 0.0, 'mean_word_length': 1.668054110301769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '751731', 'n_tokens_mistral': 661, 'n_tokens_neox': 640, 'n_words': 142}