<commit_before><?php

namespace Grid\User\View\Helper;

use Locale;
use Zend\View\Helper\AbstractHelper;
use Zend\Authentication\AuthenticationService;
use Zork\Authentication\AuthenticationServiceAwareTrait;

/**
 * UserLocale
 *
 * @author <NAME> <<EMAIL>>
 */
class UserLocale extends AbstractHelper
{

    use AuthenticationServiceAwareTrait;

    /**
     * Get user-locale
     *
     * @return string
     */
    public function getLocale()
    {
        $auth = $this->getAuthenticationService();

        if ( $auth->hasIdentity()  )
        {
            $locale = $auth->getIdentity()->locale;
        }
        else
        {
            $locale = Locale::getDefault();
        }
<commit_msg>rewrite Authentication & Session<commit_after><?php

namespace Grid\User\View\Helper;

use Locale;
use Zend\View\Helper\AbstractHelper;

/**
 * UserLocale
 *
 * @author <NAME> <<EMAIL>>
 */
class UserLocale extends AbstractHelper
{

    /**
     * Get user-locale
     *
     * @return string
     */
    public function getLocale()
    {
        $auth = $this->getView()
                     ->authentication();

        if ( $auth->hasIdentity()  )
        {
            $locale = $auth->getIdentity()->locale;
        }
        else
        {
            $locale = Locale::getDefault();
        }

{'fraction_non_alphanumeric': 0.1303680981595092, 'fraction_numerical': 0.0, 'mean_word_length': 2.107142857142857, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 18, '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': '3102955', 'n_tokens_mistral': 380, 'n_tokens_neox': 374, 'n_words': 71}