<commit_before><?php

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\View;
use redhotmayo\dataaccess\repository\SubscriptionRepository;
use redhotmayo\dataaccess\repository\UserRepository;
use redhotmayo\distribution\exception\RegionalSubscriptionException;
use redhotmayo\distribution\RegionalSubscriptionManager;
use redhotmayo\model\SubscriptionLocation;

class SubscriptionController extends BaseController {
    const TEMP_ID = 'temp_id';
    const DATA = 'regions';
    const ONE_DAY = 1440;

    /** @var \redhotmayo\dataaccess\repository\SubscriptionRepository $subscriptionRepository */
    private $subscriptionRepository;

    /** @var \redhotmayo\dataaccess\repository\UserRepository $userRepository */
    private $userRepository;

    /** @var \redhotmayo\distribution\RegionalSubscriptionManager $regSubManager */
    private $regSubManager;

    public function __construct(SubscriptionRepository $subscriptionRepository,
                                UserRepository $userRepository,
                                RegionalSubscriptionManager $regionalSubscriptionManager
    ) {
        $this->regSubManager = $regionalSubscriptionManager;
        $this->subscriptionRepository = $subscriptionRepository;
        $this->userRepository = $userRepository;
    }

    /**
     * Display a listing of the resource.
     *
     * @return Response<commit_msg>WS-17 refactor<commit_after><?php

use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\View;
use redhotmayo\dataaccess\repository\SubscriptionRepository;
use redhotmayo\dataaccess\repository\UserRepository;
use redhotmayo\distribution\exception\RegionalSubscriptionException;
use redhotmayo\distribution\RegionalSubscriptionManager;

class SubscriptionController extends BaseController {
    const TEMP_ID = 'temp_id';
    const DATA = 'regions';
    const ONE_DAY = 1440;

    /** @var \redhotmayo\dataaccess\repository\SubscriptionRepository $subscriptionRepository */
    private $subscriptionRepository;

    /** @var \redhotmayo\dataaccess\repository\UserRepository $userRepository */
    private $userRepository;

    /** @var \redhotmayo\distribution\RegionalSubscriptionManager $regSubManager */
    private $regSubManager;

    public function __construct(SubscriptionRepository $subscriptionRepository,
                                UserRepository $userRepository,
                                RegionalSubscriptionManager $regionalSubscriptionManager
    ) {
        $this->regSubManager = $regionalSubscriptionManager;
        $this->subscriptionRepository = $subscriptionRepository;
        $this->userRepository = $userRepository;
    }

    /**
     * Display a listing of the resource.
     *
     * @return Response
{'fraction_non_alphanumeric': 0.08551372048500319, 'fraction_numerical': 0.003190810465858328, 'mean_word_length': 4.032102728731942, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6190293', 'n_tokens_mistral': 800, 'n_tokens_neox': 831, 'n_words': 148}