Skip to content

Commit 8387867

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: Fix typo
2 parents c9b6ae9 + 6a95c39 commit 8387867

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

contributing/code/bc.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -491,42 +491,42 @@ If that's the case, here is how to do it properly in a minor version:
491491
#. Add the argument as a comment in the signature::
492492

493493
// the new argument can be optional
494-
public function say(string $text, /* bool $stripWithespace = true */): void
494+
public function say(string $text, /* bool $stripWhitespace = true */): void
495495
{
496496
}
497497

498498
// or required
499-
public function say(string $text, /* bool $stripWithespace */): void
499+
public function say(string $text, /* bool $stripWhitespace */): void
500500
{
501501
}
502502

503503
#. Document the new argument in a PHPDoc::
504504

505505
/**
506-
* @param bool $stripWithespace
506+
* @param bool $stripWhitespace
507507
*/
508508

509509
#. Use ``func_num_args`` and ``func_get_arg`` to retrieve the argument in the
510510
method::
511511

512-
$stripWithespace = 2 <= \func_num_args() ? func_get_arg(1) : false;
512+
$stripWhitespace = 2 <= \func_num_args() ? func_get_arg(1) : false;
513513

514514
Note that the default value is ``false`` to keep the current behavior.
515515

516516
#. If the argument has a default value that will change the current behavior,
517517
warn the user::
518518

519-
trigger_deprecation('symfony/COMPONENT', 'X.Y', 'Not passing the "bool $stripWithespace" argument explicitly is deprecated, its default value will change to X in Z.0.');
519+
trigger_deprecation('symfony/COMPONENT', 'X.Y', 'Not passing the "bool $stripWhitespace" argument explicitly is deprecated, its default value will change to X in Z.0.');
520520

521521
#. If the argument has no default value, warn the user that is going to be
522522
required in the next major version::
523523

524524
if (\func_num_args() < 2) {
525-
trigger_deprecation('symfony/COMPONENT', 'X.Y', 'The "%s()" method will have a new "bool $stripWithespace" argument in version Z.0, not defining it is deprecated.', __METHOD__);
525+
trigger_deprecation('symfony/COMPONENT', 'X.Y', 'The "%s()" method will have a new "bool $stripWhitespace" argument in version Z.0, not defining it is deprecated.', __METHOD__);
526526

527-
$stripWithespace = false;
527+
$stripWhitespace = false;
528528
} else {
529-
$stripWithespace = func_get_arg(1);
529+
$stripWhitespace = func_get_arg(1);
530530
}
531531

532532
#. In the next major version (``X.0``), uncomment the argument, remove the

0 commit comments

Comments
 (0)