Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit532b6bd

Browse files
committed
Minor tweaks
1 parent21b9aa3 commit532b6bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/Symfony/Component/OptionsResolver/OptionsResolver.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,12 @@ public function getDefinedOptions()
360360
* Instead of passing the message, you may also pass a closure with the
361361
* following signature:
362362
*
363-
* function (Options $options, $value) {
363+
* function (Options $options, $value): string {
364364
* // ...
365365
* }
366366
*
367367
* The closure receives the value as argument and should return a string.
368-
*Returns an empty string to ignore the option deprecation.
368+
*Return an empty string to ignore the option deprecation.
369369
*
370370
* The closure is invoked when {@link resolve()} is called. The parameter
371371
* passed to the closure is the value of the option after validating it
@@ -869,7 +869,7 @@ public function offsetGet($option)
869869
$this->calling[$option] =true;
870870
try {
871871
if (!\is_string($deprecationMessage =$deprecationMessage($this,$value))) {
872-
thrownewInvalidOptionsException(sprintf('Invalid type for deprecation message, expected string but got "%s",returns an empty string to ignore.',\gettype($deprecationMessage)));
872+
thrownewInvalidOptionsException(sprintf('Invalid type for deprecation message, expected string but got "%s",return an empty string to ignore.',\gettype($deprecationMessage)));
873873
}
874874
}finally {
875875
unset($this->calling[$option]);

‎src/Symfony/Component/OptionsResolver/Tests/OptionsResolverTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ public function testSetDeprecatedFailsIfInvalidDeprecationMessageType()
486486

487487
/**
488488
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidArgumentException
489-
* @expectedExceptionMessage Invalid type for deprecation message, expected string but got "boolean",returns an empty string to ignore.
489+
* @expectedExceptionMessage Invalid type for deprecation message, expected string but got "boolean",return an empty string to ignore.
490490
*/
491491
publicfunctiontestLazyDeprecationFailsIfInvalidDeprecationMessageType()
492492
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp