<commit_before><?php

namespace Pantheon\Terminus\Commands\Connection;

use Consolidation\OutputFormatters\StructuredData\AssociativeList;

use Pantheon\Terminus\Commands\TerminusCommand;
use Terminus\Collections\Sites;
use Terminus\Models\Environment;

/**
 * Class InfoCommand
 * @package Pantheon\Terminus\Commands\Connection
 */
class InfoCommand extends TerminusCommand
{
    /**
     * Retrieve connection info for a specific environment such as git, sftp, mysql, redis
     *
     * @authorized
     *
     * @command connection:info
     *
     * @field-labels
     *   sftp_username: SFTP Username
     *   sftp_host: SFTP Host
     *   sftp_password: SFTP Password
     *   sftp_url: SFTP URL
     *   sftp_command: SFTP Command
     *   git_username: Git Username
     *   git_host: Git Host
     *   git_port: Git Port
     *   git_url: Git URL
     *   git_command: Git Command
     *   mysql_host: Mysql Host
     *   mysql_username: Mysql Username
     *   mysql_password: <PASSWORD>
     *   mysql_port: Mysql Port
     *   mysql_database: Mysql Database
     *   mysql_url: Mysql URL
     *   mysql_command: Mysql Command
     *
     * @param string $environment Name of the environment to retrieve
     *
     * @return AssociativeList
     *
     * @usage connection:info awesome-site.dev --format=json
     *   Display connection information in json format
     * @usage connection:info awesome-site.dev --fields=mysql_command --format=string
     *   Display connection information only for the given parameter
     * @usage connection:info awesome-site.dev --fields=git_*
     *   Display all of the connection information fields related to git.
     *
     */<commit_msg>Correct capitalization, add Redis field labels.<commit_after><?php

namespace Pantheon\Terminus\Commands\Connection;

use Consolidation\OutputFormatters\StructuredData\AssociativeList;

use Pantheon\Terminus\Commands\TerminusCommand;
use Terminus\Collections\Sites;
use Terminus\Models\Environment;

/**
 * Class InfoCommand
 * @package Pantheon\Terminus\Commands\Connection
 */
class InfoCommand extends TerminusCommand
{
    /**
     * Retrieve connection info for a specific environment such as git, sftp, mysql, redis
     *
     * @authorized
     *
     * @command connection:info
     *
     * @field-labels
     *   sftp_username: SFTP Username
     *   sftp_host: SFTP Host
     *   sftp_password: SFTP Password
     *   sftp_url: SFTP URL
     *   sftp_command: SFTP Command
     *   git_username: Git Username
     *   git_host: Git Host
     *   git_port: Git Port
     *   git_url: Git URL
     *   git_command: Git Command
     *   mysql_host: MySQL Host
     *   mysql_username: MySQL Username
     *   mysql_password: <PASSWORD>
     *   mysql_port: MySQL Port
     *   mysql_database: MySQL Database
     *   mysql_url: MySQL URL
     *   mysql_command: MySQL Command
     *   redis_command: Redis Command
     *   redis_password: <PASSWORD>
     *   redis_port: Redis Port
     *   redis_url: Redis URL
     *
     * @param string $environment Name of the environment to retrieve
     *
     * @return AssociativeList
     *
     * @usage connection:info awesome-site.dev --format=json
     *   Display connection information in json format
     * @usage connection:info awesome-site.dev --fields=mysql_command --format=string
     *   Display connection information only for the given parameter
     * @usage connection:info awesome-site.dev --fields=git_*
     *   Display all of the connection information fields related to git.
     *
     */
{'fraction_non_alphanumeric': 0.0775716694772344, 'fraction_numerical': 0.0, 'mean_word_length': 2.7621564482029597, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '7306590', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1045, 'n_words': 284}