Skip to content

Commit

Permalink
chore: update command descriptions for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed May 15, 2024
1 parent 0c13843 commit 5df4039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/Commands/AnalyseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use GraphQL\Error\SyntaxError;
use GraphQL\Language\Parser;
use JsonException;
use Safe\Exceptions\FilesystemException;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
Expand All @@ -31,7 +32,7 @@ class AnalyseCommand extends Command

protected static $defaultName = 'analyse';

protected static $defaultDescription = 'Analyses a graphql file';
protected static $defaultDescription = 'Analyse a GraphQL file';

protected function configure(): void
{
Expand All @@ -49,22 +50,19 @@ protected function configure(): void
self::INPUT,
null,
InputOption::VALUE_OPTIONAL,
"The format for the schema inputs",
'The format for the schema inputs.',
InputFormat::FILE->value,
);
$this->addOption(
self::FORMAT,
null,
InputOption::VALUE_OPTIONAL,
"The output format",
'The output format.',
OutputFormat::Text->value,
);
}

/**
* @throws SyntaxError
* @throws FilesystemException
*/
/** @throws SyntaxError|FilesystemException|JsonException */
protected function execute(InputInterface $input, OutputInterface $output): int
{
$style = new SymfonyStyle(
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/InputFormat.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

enum InputFormat: string
{
case FILE = "file";
case TEXT = "text";
case FILE = 'file';
case TEXT = 'text';
}

0 comments on commit 5df4039

Please sign in to comment.