<commit_before><?php
namespace BetaKiller\Utils\Kohana;

use BetaKiller\View\ViewInterface;

/**
 * Trait ControllerHelperTrait
 *
 * @package BetaKiller\Utils\Kohana
 * @deprecated
 */
trait ControllerHelperTrait
{
    /**
     * Getter for request
     *
     * @return \Request
     * @deprecated
     */
    public function getRequest(): \Request
    {
        return $this->request;
    }

    /**
     * Setter for request
     *
     * @param \Request $request
     *
     * @return \Request|$this
     * @deprecated
     */
    public function setRequest(\Request $request)
    {
        $this->request = $request;

        return $this;
    }

    /**
     * Getter for response
     *
     * @return \Response
     * @deprecated
     */
    public function getResponse(): \Response
    {
        return $this->response;
    }

    /**
     * Setter for response
     *
     * @param \Response $response
     *
     * @return $this
     * @deprecated
     */
    public function setResponse(\Response $response)
    {
        $this->response = $response;

        return $this;
    }

    /**
     * Helper for Request::param()
     *
     * @param string|null $key
     * @param string|null $default
     *
     * @return mixed
     * @deprecated
     */
    protected function param($key = null, $default = null)
    {
        return $this->getRequest()->param($key, $default);
    }

    /**
     * @param null $key
     *
     * @return mixed
     * @deprecated
     */
    protected function post($key = null)
    {
        return $this->getRequest()->post($key);
    }
<commit_msg>Add ControllerHelperTrait::action() method for getting current action<commit_after><?php
namespace BetaKiller\Utils\Kohana;

use BetaKiller\View\ViewInterface;

/**
 * Trait ControllerHelperTrait
 *
 * @package BetaKiller\Utils\Kohana
 * @deprecated
 */
trait ControllerHelperTrait
{
    /**
     * Getter for request
     *
     * @return \Request
     * @deprecated
     */
    public function getRequest(): \Request
    {
        return $this->request;
    }

    /**
     * Setter for request
     *
     * @param \Request $request
     *
     * @return \Request|$this
     * @deprecated
     */
    public function setRequest(\Request $request)
    {
        $this->request = $request;

        return $this;
    }

    /**
     * Getter for response
     *
     * @return \Response
     * @deprecated
     */
    public function getResponse(): \Response
    {
        return $this->response;
    }

    /**
     * Setter for response
     *
     * @param \Response $response
     *
     * @return $this
     * @deprecated
     */
    public function setResponse(\Response $response)
    {
        $this->response = $response;

        return $this;
    }

    /**
     * Helper for Request::param()
     *
     * @param string|null $key
     * @param string|null $default
     *
     * @return mixed
     * @deprecated
     */
    protected function param($key = null, $default = null)
    {
        return $this->getRequest()->param($key, $default);
    }

    protected function action(): string
    {
        return $this->getRequest()->action();
    }

    /**
     * @param null $key
     *
     * @return mixed
     * @deprecated
     */
    protected function post($key = null)
    {
        return $this->getRequest()->post($key);
    }

{'fraction_non_alphanumeric': 0.13056468479235137, 'fraction_numerical': 0.0, 'mean_word_length': 1.8615384615384616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '1459435', 'n_tokens_mistral': 1002, 'n_tokens_neox': 996, 'n_words': 218}