<commit_before><?php

/**
 * This class routes all requests in admin to the appropriate place
 *
 * @package     Nails
 * @subpackage  module-admin
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */

use Nails\Admin\Constants;
use Nails\Admin\Exception\RouterException;
use Nails\Common\Exception\FactoryException;
use Nails\Common\Exception\NailsException;
use Nails\Components;
use Nails\Factory;

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

/**
 * Allow the app to add functionality, if needed
 */
if (class_exists('\App\Admin\Controller\BaseRouter')) {
    abstract class BaseMiddle extends \App\Admin\Controller\BaseRouter
    {
    }
} else {<commit_msg>Enforcing class hierarchy when using App overrides<commit_after><?php

/**
 * This class routes all requests in admin to the appropriate place
 *
 * @package     Nails
 * @subpackage  module-admin
 * @category    Controller
 * @author      Nails Dev Team
 * @link
 */

use Nails\Admin\Constants;
use Nails\Admin\Exception\RouterException;
use Nails\Common\Exception\FactoryException;
use Nails\Common\Exception\NailsException;
use Nails\Components;
use Nails\Factory;

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

/**
 * Allow the app to add functionality, if needed
 */
if (class_exists('\App\Admin\Controller\BaseRouter')) {
    abstract class BaseMiddle extends \App\Admin\Controller\BaseRouter
    {
        public function __construct()
        {
            if (!classExtends(parent::class, \Nails\Common\Controller\Base::class)) {
                throw new NailsException(sprintf(
                    'Class %s must extend %s',
                    parent::class,
                    \Nails\Common\Controller\Base::class
                ));
            }
            parent::__construct();
        }
    }
} else {
{'fraction_non_alphanumeric': 0.1776350989834136, 'fraction_numerical': 0.0, 'mean_word_length': 2.070607553366174, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4870906', 'n_tokens_mistral': 483, 'n_tokens_neox': 480, 'n_words': 125}