<commit_before><?php

    namespace thebuggenie\core\helpers;

    use thebuggenie\core\framework,
        thebuggenie\core\entities;

    /**
     * actions for the project module
     *
     * @property entities\Project $selected_project
     */
    class ProjectActions extends framework\Action
    {

        protected $anonymous_project_routes = [];

        /**
         * Pre-execute function
         *
         * @param framework\Request $request
         * @param string $action
         */
        public function preExecute(framework\Request $request, $action)
        {
            $project_id = $request['project_id'];
            $project_key = $request['project_key'];

            if (!$project_id && !$project_key && in_array($action, $this->anonymous_project_routes)) {
                $this->selected_project = new entities\Project();

            } else {
                try {
                    if ($project_id)
                        $this->selected_project = entities\Project::getB2DBTable()->selectById($project_id);
                    elseif ($project_key)
                        $this->selected_project = entities\Project::getByKey($project_key);<commit_msg>fix missing namespace import<commit_after><?php

    namespace thebuggenie\core\helpers;

    use thebuggenie\core\framework,
        thebuggenie\core\entities,
        thebuggenie\core\entities\tables;

    /**
     * actions for the project module
     *
     * @property entities\Project $selected_project
     */
    class ProjectActions extends framework\Action
    {

        protected $anonymous_project_routes = [];

        /**
         * Pre-execute function
         *
         * @param framework\Request $request
         * @param string $action
         */
        public function preExecute(framework\Request $request, $action)
        {
            $project_id = $request['project_id'];
            $project_key = $request['project_key'];

            if (!$project_id && !$project_key && in_array($action, $this->anonymous_project_routes)) {
                $this->selected_project = new entities\Project();

            } else {
                try {
                    if ($project_id)
                        $this->selected_project = entities\Project::getB2DBTable()->selectById($project_id);
                    elseif ($project_key)
                        $this->selected_project = entities\Project::getByKey($project_key);
{'fraction_non_alphanumeric': 0.10915059499384488, 'fraction_numerical': 0.0008206811653672548, 'mean_word_length': 1.9659367396593674, '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': '4530238', 'n_tokens_mistral': 633, 'n_tokens_neox': 621, 'n_words': 113}