Skip to content

Commit e56209e

Browse files
committed
Fix typo
1 parent b07aadc commit e56209e

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
@@ -496,42 +496,42 @@ If that's the case, here is how to do it properly in a minor version:
496496
#. Add the argument as a comment in the signature::
497497

498498
// the new argument can be optional
499-
public function say(string $text, /* bool $stripWithespace = true */): void
499+
public function say(string $text, /* bool $stripWhitespace = true */): void
500500
{
501501
}
502502

503503
// or required
504-
public function say(string $text, /* bool $stripWithespace */): void
504+
public function say(string $text, /* bool $stripWhitespace */): void
505505
{
506506
}
507507

508508
#. Document the new argument in a PHPDoc::
509509

510510
/**
511-
* @param bool $stripWithespace
511+
* @param bool $stripWhitespace
512512
*/
513513

514514
#. Use ``func_num_args`` and ``func_get_arg`` to retrieve the argument in the
515515
method::
516516

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

519519
Note that the default value is ``false`` to keep the current behavior.
520520

521521
#. If the argument has a default value that will change the current behavior,
522522
warn the user::
523523

524-
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.');
524+
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.');
525525

526526
#. If the argument has no default value, warn the user that is going to be
527527
required in the next major version::
528528

529529
if (\func_num_args() < 2) {
530-
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__);
530+
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__);
531531

532-
$stripWithespace = false;
532+
$stripWhitespace = false;
533533
} else {
534-
$stripWithespace = func_get_arg(1);
534+
$stripWhitespace = func_get_arg(1);
535535
}
536536

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

0 commit comments

Comments
 (0)