<commit_before><?php

use Nails\Factory;

class Redirect extends NAILS_Controller
{
    public function index()
    {
        $oRedirectModel = Factory::model('Redirect', 'nailsapp/module-redirect');
        $oRedirect      = $oRedirectModel->getById($this->uri->rsegment(3));

        if (empty($oRedirect)) {
            show_404();
        }

        redirect($oRedirect->new_url, 'location', $oRedirect->type);<commit_msg>Removed dependency on NAILS_Controller in favour of namespaced App Controller<commit_after><?php

use Nails\Factory;
use App\Controller\Base;

class Redirect extends Base
{
    public function index()
    {
        $oRedirectModel = Factory::model('Redirect', 'nailsapp/module-redirect');
        $oRedirect      = $oRedirectModel->getById($this->uri->rsegment(3));

        if (empty($oRedirect)) {
            show_404();
        }

        redirect($oRedirect->new_url, 'location', $oRedirect->type);
{'fraction_non_alphanumeric': 0.13885898815931108, 'fraction_numerical': 0.008611410118406888, 'mean_word_length': 3.227272727272727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4020198', 'n_tokens_mistral': 277, 'n_tokens_neox': 269, 'n_words': 52}