<commit_before><?php
/**
 * Minds Admin: Analytics : Signups
 *
 * @version 1
 * @author <NAME>
 *
 */
namespace Minds\Controllers\api\v1\admin\analytics;

use Minds\Core;
use Minds\Helpers;
use Minds\Entities;
use Minds\Interfaces;
use Minds\Api\Factory;
use DateTime;

class signups implements Interfaces\Api, Interfaces\ApiAdminPam
{
    /**
     * Return analytics data
     * @param array $pages
     */
    public function get($pages)
    {
        $response = array();

        $db = new Core\Data\Call('entities_by_time');

        $app = Core\Analytics\App::_()
        ->setMetric('signup');

        $response['daily'] = $app->get(30);
        $response['montly'] = $app->get(3, 'month');


        return Factory::response($response);
    }

    /**
     * @param array $pages
     */
    public function post($pages)
    {
        return Factory::response(array());
    }

    /**
     * @param array $pages
     */
    public function put($pages)
    {
        return Factory::response(array());
    }

    /**
     * @param array $pages
     */
    public function delete($pages)
    {
        return Factory::response(array());
    }
}
<commit_msg>(feat): only return 7 days of signups<commit_after><?php
/**
 * Minds Admin: Analytics : Signups
 *
 * @version 1
 * @author <NAME>
 *
 */
namespace Minds\Controllers\api\v1\admin\analytics;

use Minds\Core;
use Minds\Helpers;
use Minds\Entities;
use Minds\Interfaces;
use Minds\Api\Factory;
use DateTime;

class signups implements Interfaces\Api, Interfaces\ApiAdminPam
{
    /**
     * Return analytics data
     * @param array $pages
     */
    public function get($pages)
    {
        $response = array();

        $db = new Core\Data\Call('entities_by_time');

        $app = Core\Analytics\App::_()
        ->setMetric('signup');

        $response['daily'] = $app->get(7);
        array_pop($response['daily']); //remove todays count
        $response['montly'] = $app->get(3, 'month');


        return Factory::response($response);
    }

    /**
     * @param array $pages
     */
    public function post($pages)
    {
        return Factory::response(array());
    }

    /**
     * @param array $pages
     */
    public function put($pages)
    {
        return Factory::response(array());
    }

    /**
     * @param array $pages
     */
    public function delete($pages)
    {
        return Factory::response(array());
    }
}

{'fraction_non_alphanumeric': 0.1546434494195688, 'fraction_numerical': 0.0041459369817578775, 'mean_word_length': 2.3748251748251747, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '1682246', 'n_tokens_mistral': 765, 'n_tokens_neox': 751, 'n_words': 162}