diff --git a/src/Commands/AnalyseCommand.php b/src/Commands/AnalyseCommand.php index 59e61a8..c428185 100644 --- a/src/Commands/AnalyseCommand.php +++ b/src/Commands/AnalyseCommand.php @@ -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; @@ -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 { @@ -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( diff --git a/src/Commands/InputFormat.php b/src/Commands/InputFormat.php index 98a7a83..18a4c51 100644 --- a/src/Commands/InputFormat.php +++ b/src/Commands/InputFormat.php @@ -6,6 +6,6 @@ enum InputFormat: string { - case FILE = "file"; - case TEXT = "text"; + case FILE = 'file'; + case TEXT = 'text'; }