<commit_before><?php
namespace Minds\Core\Analytics\Dashboards\Metrics\Engagement;

use Minds\Core\Di\Di;
use Minds\Core\Session;
use Minds\Core\Data\ElasticSearch;
use Minds\Core\Analytics\Dashboards\Metrics\AbstractMetric;
use Minds\Core\Analytics\Dashboards\Metrics\MetricSummary;
use Minds\Core\Analytics\Dashboards\Metrics\Visualisations;
use Minds\Core\Analytics\Dashboards\Metrics\HistogramSegment;

class UnlocksMetric extends AbstractEngagementMetric
{
	public function __construct($es = null)
    {
        parent::__construct($es);
        $this->segments = [
            (new HistogramSegment())
                ->setAggField('unlocks:plus::total')
                ->setAggType('sum'),
            (new HistogramSegment())
                ->setAggField('unlocks:plus::share')
                ->setAggType('avg')
                ->setLabel('Share %'),
        ];
    }

    /** @var string */
    protected $id = 'unlocks';

    /** @var string */
    protected $label = 'Minds+ Unlocks';<commit_msg>(fix): bad linting<commit_after><?php
namespace Minds\Core\Analytics\Dashboards\Metrics\Engagement;

use Minds\Core\Di\Di;
use Minds\Core\Session;
use Minds\Core\Data\ElasticSearch;
use Minds\Core\Analytics\Dashboards\Metrics\AbstractMetric;
use Minds\Core\Analytics\Dashboards\Metrics\MetricSummary;
use Minds\Core\Analytics\Dashboards\Metrics\Visualisations;
use Minds\Core\Analytics\Dashboards\Metrics\HistogramSegment;

class UnlocksMetric extends AbstractEngagementMetric
{
    public function __construct($es = null)
    {
        parent::__construct($es);
        $this->segments = [
            (new HistogramSegment())
                ->setAggField('unlocks:plus::total')
                ->setAggType('sum'),
            (new HistogramSegment())
                ->setAggField('unlocks:plus::share')
                ->setAggType('avg')
                ->setLabel('Share %'),
        ];
    }

    /** @var string */
    protected $id = 'unlocks';

    /** @var string */
    protected $label = 'Minds+ Unlocks';
{'fraction_non_alphanumeric': 0.1354679802955665, 'fraction_numerical': 0.0, 'mean_word_length': 2.8612167300380227, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '3870877', 'n_tokens_mistral': 632, 'n_tokens_neox': 603, 'n_words': 95}