Skip to content

Commit 8aef8bf

Browse files
committed
fix phpstan
1 parent 91b530e commit 8aef8bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/JsonSchema/Command/JsonSchemaGenerateCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function configure()
5353
->addOption('itemOperation', null, InputOption::VALUE_REQUIRED, 'The item operation')
5454
->addOption('collectionOperation', null, InputOption::VALUE_REQUIRED, 'The collection operation')
5555
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The response format', (string) $this->formats[0])
56-
->addOption('type', null, InputOption::VALUE_REQUIRED, 'Use this option to set the type of output', 'input');
56+
->addOption('type', null, InputOption::VALUE_REQUIRED, 'The type of schema to generate (input or output)', 'input');
5757
}
5858

5959
/**
@@ -81,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8181
}
8282

8383
if (!\in_array($format, $this->formats, true)) {
84-
throw new InvalidOptionException(sprintf('The response format "%s" is not supported. Supported formats are : %s.', $format, (string) implode(', ', $this->formats)));
84+
throw new InvalidOptionException(sprintf('The response format "%s" is not supported. Supported formats are : %s.', $format, implode(', ', $this->formats)));
8585
}
8686

8787
/** @var ?string $operationType */

tests/JsonSchema/Command/JsonSchemaGenerateCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testExecuteWithTooManyOptions()
6868
{
6969
$this->tester->run(['command' => 'api:json-schema:generate', 'resource' => $this->entityClass, '--collectionOperation' => 'get', '--itemOperation' => 'get', '--type' => 'output']);
7070

71-
$this->assertStringContainsString('[ERROR] You can only use one of "--itemOperation" and "--collectionOperation" options at the same time.', $this->tester->getDisplay());
71+
$this->assertStringStartsWith('[ERROR] You can only use one of "--itemOperation" and "--collectionOperation"', trim(str_replace(["\r", "\n"], '', $this->tester->getDisplay())));
7272
}
7373

7474
public function testExecuteWithJsonldFormatOption()

0 commit comments

Comments
 (0)