Skip to content

Commit b2826f4

Browse files
committed
minor #15097 Update definitions.rst (mostefamed)
This PR was merged into the 4.4 branch. Discussion ---------- Update definitions.rst Rename the returned variable from setArgument method and the assigned variable to addArgument method <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `5.x` for features of unreleased versions). --> Commits ------- ad6075b Update definitions.rst
2 parents f7d2e9f + ad6075b commit b2826f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

service_container/definitions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ fetched from the container::
9292
9393
// adds a new argument with the name of the argument
9494
// $argumentName = the name of the argument in the constructor
95-
$argument = $definition->setArgument('$argumentName', $argumentValue);
95+
$definition = $definition->setArgument('$argumentName', $argumentValue);
9696

9797
// adds a new argument
98-
$definition->addArgument($argument);
98+
$definition->addArgument($argumentValue);
9999

100100
// replaces argument on a specific index (0 = first argument)
101101
$definition->replaceArgument($index, $argument);

0 commit comments

Comments
 (0)