Skip to content

Commit 1130da7

Browse files
committed
fix
1 parent 05b3b3e commit 1130da7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Console/GenerateCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function __invoke(Container $container, DirectoriesInterface $dirs): int
120120
$renderer->renderImports($imports);
121121
}
122122

123-
if ($config->getDocuments() === null || $config->getDocuments() === []) {
123+
if ($config->getDocuments() === null || $config->getDocuments()->getItems() === []) {
124124
if ($this->asJson) {
125125
$this->output->writeln(\json_encode([
126126
'status' => 'success',

tests/src/Feature/Console/GenerateCommandTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ public function simple_config_should_be_rendered(string $command): void
5555
);
5656
}
5757

58+
#[\Override]
5859
protected function setUp(): void
5960
{
6061
parent::setUp();
6162

6263
$this->outputDir = $this->getFixturesDir('Console/GenerateCommand/.context');
6364
}
6465

66+
#[\Override]
6567
protected function tearDown(): void
6668
{
6769
parent::tearDown();

0 commit comments

Comments
 (0)