Skip to content

Commit e890d84

Browse files
committed
minor #18039 Use constructor property promotion in monolog_console.rst code example (timkrase)
This PR was merged into the 6.2 branch. Discussion ---------- Use constructor property promotion in monolog_console.rst code example As described in the PR title Commits ------- 12e04fe Use cpp in monolog console code example
2 parents 7dbc2a6 + 12e04fe commit e890d84

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

logging/monolog_console.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@ The example above could then be rewritten as::
4545

4646
class YourCommand extends Command
4747
{
48-
private $logger;
49-
50-
public function __construct(LoggerInterface $logger)
48+
public function __construct(private LoggerInterface $logger)
5149
{
52-
$this->logger = $logger;
5350
}
5451

5552
protected function execute(InputInterface $input, OutputInterface $output)

0 commit comments

Comments
 (0)