<commit_before><?php

namespace CodeTool\ArtifactDownloader\CmdRunner\Command\Factory;

use CodeTool\ArtifactDownloader\CmdRunner\CmdRunnerInterface;
use CodeTool\ArtifactDownloader\CmdRunner\Command\CmdRunnerCommandExec;

class CmdRunnerCommandFactory implements CmdRunnerCommandFactoryInterface
{
    /**
     * @var CmdRunnerInterface
     */
    private $cmdRunner;

    /**
     * @param CmdRunnerInterface $cmdRunner
     */
    public function __construct(CmdRunnerInterface $cmdRunner)
    {
        $this->cmdRunner = $cmdRunner;
    }

    private function getCurrentEnv()
    {
        if ([] !== $_ENV) {
            return $_ENV;
        }

        $forbiddenKeys = [
            'PHP_SELF', 'argv', 'argc', 'GATEWAY_INTERFACE',
            'SERVER_ADDR', 'SERVER_NAME', 'SERVER_SOFTWARE', 'SERVER_PROTOCOL', 'REQUEST_METHOD', 'REQUEST_TIME',
            'REQUEST_TIME_FLOAT', 'QUERY_STRING', 'DOCUMENT_ROOT',
            'HTTP_ACCEPT', 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT_ENCODING', 'HTTP_ACCEPT_LANGUAGE',
            'HTTP_CONNECTION', 'HTTP_HOST', 'HTTP_REFERER', 'HTTP_USER_AGENT', 'HTTPS',
            'REMOTE_ADDR', 'REMOTE_HOST', 'REMOTE_PORT', 'REMOTE_USER', 'REDIRECT_REMOTE_USER',
            'SCRIPT_FILENAME', 'SERVER_ADMIN', 'SERVER_PORT', 'SERVER_SIGNATURE',
            'PATH_TRANSLATED', 'SCRIPT_NAME', 'REQUEST_URI', 'PHP_AUTH_DIGEST',<commit_msg>Updated forbidden keys in CmdRunnerCommandFactory::getCurrentEnv()<commit_after><?php

namespace CodeTool\ArtifactDownloader\CmdRunner\Command\Factory;

use CodeTool\ArtifactDownloader\CmdRunner\CmdRunnerInterface;
use CodeTool\ArtifactDownloader\CmdRunner\Command\CmdRunnerCommandExec;

class CmdRunnerCommandFactory implements CmdRunnerCommandFactoryInterface
{
    /**
     * @var CmdRunnerInterface
     */
    private $cmdRunner;

    /**
     * @param CmdRunnerInterface $cmdRunner
     */
    public function __construct(CmdRunnerInterface $cmdRunner)
    {
        $this->cmdRunner = $cmdRunner;
    }

    private function getCurrentEnv()
    {
        if ([] !== $_ENV) {
            return $_ENV;
        }

        $forbiddenKeys = [
            '_', 'PHP_SELF', 'argv', 'argc', 'GATEWAY_INTERFACE',
            'SERVER_ADDR', 'SERVER_NAME', 'SERVER_SOFTWARE', 'SERVER_PROTOCOL', 'REQUEST_METHOD', 'REQUEST_TIME',
            'REQUEST_TIME_FLOAT', 'QUERY_STRING', 'DOCUMENT_ROOT',
            'HTTP_ACCEPT', 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT_ENCODING', 'HTTP_ACCEPT_LANGUAGE',
            'HTTP_CONNECTION', 'HTTP_HOST', 'HTTP_REFERER', 'HTTP_USER_AGENT', 'HTTPS',
            'REMOTE_ADDR', 'REMOTE_HOST', 'REMOTE_PORT', 'REMOTE_USER', 'REDIRECT_REMOTE_USER',
            'SCRIPT_FILENAME', 'SERVER_ADMIN', 'SERVER_PORT', 'SERVER_SIGNATURE',
            'PATH_TRANSLATED', 'SCRIPT_NAME', 'REQUEST_URI', 'PHP_AUTH_DIGEST',
{'fraction_non_alphanumeric': 0.1240227434257285, 'fraction_numerical': 0.0, 'mean_word_length': 3.691666666666667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5047789', 'n_tokens_mistral': 908, 'n_tokens_neox': 881, 'n_words': 137}