<commit_before><?php

namespace RcmUser\Api\Controller;

use Rcm\Http\NotAllowedResponseJsonZf2;
use RcmUser\Provider\RcmUserAclResourceProvider;
use RcmUser\InputFilter\LoginInputFilter;
use Reliv\RcmApiLib\Model\ApiMessage;
use Zend\Http\Response;

class UserController extends AbstractController
{
    /**
     * List of RPC methods that are passed as IDs
     *
     * @var array
     */
    protected $reservedIds
        = [
            'current',
            'login',
            'logout',
        ];

    /**
     * get
     *
     * @param mixed $id
     *
     * @return \Reliv\RcmApiLib\Http\ApiResponse
     */
    public function get($id)
    {
        $rcmUserService = $this->getRcmUserService();
        $user = null;

        if ($id == 'current') {
            $user = $rcmUserService->getCurrentUser();
        } else {
            return new NotAllowedResponseJsonZf2();
        }

        if (empty($user)) {
            return $this->getApiResponse(
                $user,<commit_msg>Clean up code<commit_after><?php

namespace RcmUser\Api\Controller;

use Rcm\Http\NotAllowedResponseJsonZf2;
use RcmUser\Provider\RcmUserAclResourceProvider;
use RcmUser\InputFilter\LoginInputFilter;
use Reliv\RcmApiLib\Model\ApiMessage;
use Zend\Http\Response;

class UserController extends AbstractController
{
    /**
     * get
     *
     * @param mixed $id
     *
     * @return \Reliv\RcmApiLib\Http\ApiResponse
     */
    public function get($id)
    {
        $rcmUserService = $this->getRcmUserService();
        $user = null;

        if ($id == 'current') {
            $user = $rcmUserService->getCurrentUser();
        } else {
            return new NotAllowedResponseJsonZf2();
        }

        if (empty($user)) {
            return $this->getApiResponse(
                $user,
{'fraction_non_alphanumeric': 0.11363636363636363, 'fraction_numerical': 0.0022172949002217295, 'mean_word_length': 2.1666666666666665, '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': '5439934', 'n_tokens_mistral': 557, 'n_tokens_neox': 553, 'n_words': 105}