<commit_before><?php

namespace Pantheon\Terminus\Commands\Site;

use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
use Pantheon\Terminus\Commands\StructuredListTrait;

class ListCommand extends SiteCommand
{
    use StructuredListTrait;

    /**
     * Displays the list of sites accessible to the currently logged-in user.
     *
     * @authorize
     *
     * @command site:list
     * @aliases sites
     *
     * @field-labels
     *     name: Name
     *     id: ID
     *     plan_name: Plan
     *     framework: Framework
     *     region: Region
     *     owner: Owner
     *     created: Created
     *     memberships: Memberships
     *     frozen: Is Frozen?
     *     last_frozen_at: Date frozen
     * @default-fields name,id,plan_name,framework,region,owner,created,memberships,frozen
     * @return RowsOfFields
     *
     * @option name Name filter
     * @option org Organization filter; "all" or an organization's name, label, or ID
     * @option owner Owner filter; "me" or user UUID
     * @option plan Plan filter; filter by the plan's label
     * @option team Team-only filter
     * @option string $upstream Upstream name to filter<commit_msg>Added filter option to site list command<commit_after><?php

namespace Pantheon\Terminus\Commands\Site;

use Consolidation\OutputFormatters\StructuredData\RowsOfFields;
use Pantheon\Terminus\Commands\StructuredListTrait;

class ListCommand extends SiteCommand
{
    use StructuredListTrait;

    /**
     * Displays the list of sites accessible to the currently logged-in user.
     *
     * @authorize
     * @filter-output
     *
     * @command site:list
     * @aliases sites
     *
     * @field-labels
     *     name: Name
     *     id: ID
     *     plan_name: Plan
     *     framework: Framework
     *     region: Region
     *     owner: Owner
     *     created: Created
     *     memberships: Memberships
     *     frozen: Is Frozen?
     *     last_frozen_at: Date frozen
     * @default-fields name,id,plan_name,framework,region,owner,created,memberships,frozen
     * @return RowsOfFields
     *
     * @option name Name filter
     * @option org Organization filter; "all" or an organization's name, label, or ID
     * @option owner Owner filter; "me" or user UUID
     * @option plan Plan filter; filter by the plan's label
     * @option team Team-only filter
     * @option string $upstream Upstream name to filter
{'fraction_non_alphanumeric': 0.08192671881432688, 'fraction_numerical': 0.0, 'mean_word_length': 2.6, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5543706', 'n_tokens_mistral': 728, 'n_tokens_neox': 709, 'n_words': 206}