<commit_before><?php

namespace Concrete\Package\Centry\Controller\SinglePage\Dashboard\System;

use Concrete\Core\Config\Repository\Repository;
use Concrete\Core\Job\Job;
use Concrete\Core\Page\Controller\DashboardPageController;
use Concrete\Core\Url\Resolver\PathUrlResolver;

final class Centry extends DashboardPageController
{
    public function view()
    {
        $config = $this->app->make(Repository::class);

        $this->set('linkToCentryPortal', $this->getLinkToCentryPortal());

        $this->set('endpoint', $this->getEndpoint());
        $this->set('shouldShowSubscribeButton', $this->getShouldShowSubscribeButton());
        $this->set('job', $this->getJob());
        $this->set('config', $config);
        $this->set('apiMethods', $this->getApiMethods());
    }

    public function save()
    {
        if (!$this->token->validate('<PASSWORD>.centry.settings')) {
            $this->error->add($this->token->getErrorMessage());
            return $this->view();<commit_msg>Explicitly set 'token' for 8.3.3.x compatibility<commit_after><?php

namespace Concrete\Package\Centry\Controller\SinglePage\Dashboard\System;

use Concrete\Core\Config\Repository\Repository;
use Concrete\Core\Job\Job;
use Concrete\Core\Page\Controller\DashboardPageController;
use Concrete\Core\Url\Resolver\PathUrlResolver;

final class Centry extends DashboardPageController
{
    public function view()
    {
        $config = $this->app->make(Repository::class);

        $this->set('linkToCentryPortal', $this->getLinkToCentryPortal());

        $this->set('endpoint', $this->getEndpoint());
        $this->set('shouldShowSubscribeButton', $this->getShouldShowSubscribeButton());
        $this->set('job', $this->getJob());
        $this->set('config', $config);
        $this->set('apiMethods', $this->getApiMethods());
        $this->set('token', $this->token);
    }

    public function save()
    {
        if (!$this->token->validate('<PASSWORD>0.centry.settings')) {
            $this->error->add($this->token->getErrorMessage());
            return $this->view();
{'fraction_non_alphanumeric': 0.1710843373493976, 'fraction_numerical': 0.0019277108433734939, 'mean_word_length': 3.8618266978922717, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 47, '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': '4224174', 'n_tokens_mistral': 613, 'n_tokens_neox': 609, 'n_words': 88}