<commit_before><?php
/**
 * Minds Analytics Api endpoint
 *
 * @version 1
 * @author <NAME>
 *
 */
namespace Minds\Controllers\api\v1;

use Swagger\Annotations as SWG;
use Minds\Core;
use Minds\Helpers;
use Minds\Entities;
use Minds\Interfaces;
use Minds\Api\Factory;

class analytics implements Interfaces\Api, Interfaces\ApiIgnorePam
{

    public function get($pages)
    {
        Factory::isLoggedIn();
<commit_msg>(fix): direct to login on no analytics<commit_after><?php
/**
 * Minds Analytics Api endpoint
 *
 * @version 1
 * @author <NAME>
 *
 */
namespace Minds\Controllers\api\v1;

use Swagger\Annotations as SWG;
use Minds\Core;
use Minds\Helpers;
use Minds\Entities;
use Minds\Interfaces;
use Minds\Api\Factory;

class analytics implements Interfaces\Api, Interfaces\ApiIgnorePam
{

    public function get($pages)
    {
        //Factory::isLoggedIn();
        if(!Core\Session::isLoggedin()){
            return Factory::response(['status'=>'error']);
        }

{'fraction_non_alphanumeric': 0.12896622313203684, 'fraction_numerical': 0.0040941658137154556, 'mean_word_length': 3.7475728155339807, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, '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': '1341593', 'n_tokens_mistral': 321, 'n_tokens_neox': 325, 'n_words': 77}