CoreFiles by mySites.guru
BashCompletionOutput.php33 lines, 984 bytes, from Joomla_6.2.1-Stable-Full_Package.zip
Raw History Compare with 6.2.0
md5
8f220111241078fbbcbc9aa488d7e63f
sha1
9f252051691f23b42011cfd4bd2d6d91c3b14d18
sha256
39a8a0d179236903bcc60dcdaf8c27435d719fda7abe98961365c47ff6ff80f0
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Completion\Output;

use Symfony\Component\Console\Completion\CompletionSuggestions;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * @author Wouter de Jong <[email protected]>
 */
class BashCompletionOutput implements CompletionOutputInterface
{
    public function write(CompletionSuggestions $suggestions, OutputInterface $output): void
    {
        $values = $suggestions->getValueSuggestions();
        foreach ($suggestions->getOptionSuggestions() as $option) {
            $values[] = '--'.$option->getName();
            if ($option->isNegatable()) {
                $values[] = '--no-'.$option->getName();
            }
        }
        $output->writeln(implode("\n", $values));
    }
}

The same content is in 213 releases, Joomla 4.3.0-alpha1 to 6.2.1. See them all, or every version of this file.