Skip to content

Commit 07f7bbc

Browse files
authored
Fix readme example (#182)
1 parent 7f8d421 commit 07f7bbc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ImportMoviesCommand extends ParallelCommand
6666
// ...
6767
}
6868

69-
protected function fetchItems(InputInterface $input): iterable
69+
protected function fetchItems(InputInterface $input, OutputInterface $output): iterable
7070
{
7171
// open up the file and read movie data...
7272

@@ -85,8 +85,12 @@ class ImportMoviesCommand extends ParallelCommand
8585
// insert into the database
8686
}
8787

88-
protected function getItemName(int $count): string
88+
protected function getItemName(?int $count): string
8989
{
90+
if (null === $count) {
91+
return 'movie(s)';
92+
}
93+
9094
return 1 === $count ? 'movie' : 'movies';
9195
}
9296
}

0 commit comments

Comments
 (0)