diff --git a/src/Codeception/Command/Run.php b/src/Codeception/Command/Run.php
index d9da81d6d6..161451552d 100644
--- a/src/Codeception/Command/Run.php
+++ b/src/Codeception/Command/Run.php
@@ -419,7 +419,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
if ($this->options['shard']) {
$this->output->writeln(
- "[Shard ${userOptions['shard']}] Running subset of tests"
+ "[Shard {$userOptions['shard']}] Running subset of tests"
);
}
@@ -502,7 +502,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
if ($this->options['shard']) {
$this->output->writeln(
- "[Shard ${userOptions['shard']}] Merge this result with other shards to see the complete report"
+ "[Shard {$userOptions['shard']}] Merge this result with other shards to see the complete report"
);
}