Skip to content

Commit 2adde56

Browse files
Fix wrong boolean values
1 parent 77d0a7b commit 2adde56

18 files changed

+78
-80
lines changed

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ public function testMoney()
21412141
public function testMoneyWithoutCurrency()
21422142
{
21432143
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\MoneyType', 1234.56, [
2144-
'currency' => false,
2144+
'currency' => null,
21452145
]);
21462146

21472147
$this->assertWidgetMatchesXpath($form->createView(), ['id' => 'my&id', 'attr' => ['class' => 'my&class']],

src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ public function testClosureProxy()
18561856
{
18571857
$container = new ContainerBuilder();
18581858
$container->register('closure_proxy', SingleMethodInterface::class)
1859-
->setPublic('true')
1859+
->setPublic(true)
18601860
->setFactory(['Closure', 'fromCallable'])
18611861
->setArguments([[new Reference('foo'), 'cloneFoo']])
18621862
->setLazy(true);
@@ -1878,12 +1878,12 @@ public function testClosure()
18781878
{
18791879
$container = new ContainerBuilder();
18801880
$container->register('closure', 'Closure')
1881-
->setPublic('true')
1881+
->setPublic(true)
18821882
->setFactory(['Closure', 'fromCallable'])
18831883
->setArguments([new Reference('bar')]);
18841884
$container->register('bar', 'stdClass');
18851885
$container->register('closure_of_service_closure', 'Closure')
1886-
->setPublic('true')
1886+
->setPublic(true)
18871887
->setFactory(['Closure', 'fromCallable'])
18881888
->setArguments([new ServiceClosureArgument(new Reference('bar2'))]);
18891889
$container->register('bar2', 'stdClass');
@@ -1897,15 +1897,15 @@ public function testAutowireClosure()
18971897
{
18981898
$container = new ContainerBuilder();
18991899
$container->register('foo', Foo::class)
1900-
->setPublic('true');
1900+
->setPublic(true);
19011901
$container->register('my_callable', MyCallable::class)
1902-
->setPublic('true');
1902+
->setPublic(true);
19031903
$container->register('baz', \Closure::class)
19041904
->setFactory(['Closure', 'fromCallable'])
19051905
->setArguments(['var_dump'])
1906-
->setPublic('true');
1906+
->setPublic(true);
19071907
$container->register('bar', LazyClosureConsumer::class)
1908-
->setPublic('true')
1908+
->setPublic(true)
19091909
->setAutowired(true);
19101910
$container->compile();
19111911
$dumper = new PhpDumper($container);
@@ -1931,12 +1931,12 @@ public function testLazyClosure()
19311931
{
19321932
$container = new ContainerBuilder();
19331933
$container->register('closure1', 'Closure')
1934-
->setPublic('true')
1934+
->setPublic(true)
19351935
->setFactory(['Closure', 'fromCallable'])
19361936
->setLazy(true)
19371937
->setArguments([[new Reference('foo'), 'cloneFoo']]);
19381938
$container->register('closure2', 'Closure')
1939-
->setPublic('true')
1939+
->setPublic(true)
19401940
->setFactory(['Closure', 'fromCallable'])
19411941
->setLazy(true)
19421942
->setArguments([[new Reference('foo_void'), '__invoke']]);
@@ -1970,10 +1970,10 @@ public function testLazyAutowireAttribute()
19701970
{
19711971
$container = new ContainerBuilder();
19721972
$container->register('foo', Foo::class)
1973-
->setPublic('true');
1973+
->setPublic(true);
19741974
$container->setAlias(Foo::class, 'foo');
19751975
$container->register('bar', LazyServiceConsumer::class)
1976-
->setPublic('true')
1976+
->setPublic(true)
19771977
->setAutowired(true);
19781978
$container->compile();
19791979
$dumper = new PhpDumper($container);
@@ -1993,7 +1993,7 @@ public function testLazyAutowireAttributeWithIntersection()
19931993
{
19941994
$container = new ContainerBuilder();
19951995
$container->register('foo', AAndIInterfaceConsumer::class)
1996-
->setPublic('true')
1996+
->setPublic(true)
19971997
->setAutowired(true);
19981998

19991999
$container->compile();
@@ -2017,7 +2017,7 @@ public function testCallableAdapterConsumer()
20172017
$container = new ContainerBuilder();
20182018
$container->register('foo', Foo::class);
20192019
$container->register('bar', CallableAdapterConsumer::class)
2020-
->setPublic('true')
2020+
->setPublic(true)
20212021
->setAutowired(true);
20222022
$container->compile();
20232023
$dumper = new PhpDumper($container);

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/IntegerToLocalizedStringTransformerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testTransformWithRounding($input, $output, $roundingMode)
9595
public function testReverseTransform()
9696
{
9797
// Since we test against "de_AT", we need the full implementation
98-
IntlTestHelper::requireFullIntl($this, false);
98+
IntlTestHelper::requireFullIntl($this);
9999

100100
\Locale::setDefault('de_AT');
101101

@@ -115,7 +115,7 @@ public function testReverseTransformEmpty()
115115
public function testReverseTransformWithGrouping()
116116
{
117117
// Since we test against "de_DE", we need the full implementation
118-
IntlTestHelper::requireFullIntl($this, false);
118+
IntlTestHelper::requireFullIntl($this);
119119

120120
\Locale::setDefault('de_DE');
121121

@@ -210,7 +210,7 @@ public function testReverseTransformExpectsValidNumber()
210210
public function testReverseTransformExpectsInteger($number, $locale)
211211
{
212212
$this->expectException(TransformationFailedException::class);
213-
IntlTestHelper::requireFullIntl($this, false);
213+
IntlTestHelper::requireFullIntl($this);
214214

215215
\Locale::setDefault($locale);
216216

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/MoneyToLocalizedStringTransformerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function tearDown(): void
3636
public function testTransform()
3737
{
3838
// Since we test against "de_AT", we need the full implementation
39-
IntlTestHelper::requireFullIntl($this, false);
39+
IntlTestHelper::requireFullIntl($this);
4040

4141
\Locale::setDefault('de_AT');
4242

@@ -71,7 +71,7 @@ public function testTransformEmpty()
7171
public function testReverseTransform()
7272
{
7373
// Since we test against "de_AT", we need the full implementation
74-
IntlTestHelper::requireFullIntl($this, false);
74+
IntlTestHelper::requireFullIntl($this);
7575

7676
\Locale::setDefault('de_AT');
7777

@@ -99,7 +99,7 @@ public function testReverseTransformEmpty()
9999
public function testFloatToIntConversionMismatchOnReverseTransform()
100100
{
101101
$transformer = new MoneyToLocalizedStringTransformer(null, null, null, 100);
102-
IntlTestHelper::requireFullIntl($this, false);
102+
IntlTestHelper::requireFullIntl($this);
103103
\Locale::setDefault('de_AT');
104104

105105
$this->assertSame(3655, (int) $transformer->reverseTransform('36,55'));
@@ -108,7 +108,7 @@ public function testFloatToIntConversionMismatchOnReverseTransform()
108108
public function testFloatToIntConversionMismatchOnTransform()
109109
{
110110
$transformer = new MoneyToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_DOWN, 100);
111-
IntlTestHelper::requireFullIntl($this, false);
111+
IntlTestHelper::requireFullIntl($this);
112112
\Locale::setDefault('de_AT');
113113

114114
$this->assertSame('10,20', $transformer->transform(1020));
@@ -120,7 +120,7 @@ public function testValidNumericValuesWithNonDotDecimalPointCharacter()
120120
setlocale(\LC_ALL, 'de_AT.UTF-8');
121121

122122
$transformer = new MoneyToLocalizedStringTransformer(4, null, null, 100);
123-
IntlTestHelper::requireFullIntl($this, false);
123+
IntlTestHelper::requireFullIntl($this);
124124
\Locale::setDefault('de_AT');
125125

126126
$this->assertSame('0,0035', $transformer->transform(12 / 34));

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static function provideTransformations()
6565
public function testTransform($from, $to, $locale)
6666
{
6767
// Since we test against other locales, we need the full implementation
68-
IntlTestHelper::requireFullIntl($this, false);
68+
IntlTestHelper::requireFullIntl($this);
6969

7070
\Locale::setDefault($locale);
7171

@@ -91,7 +91,7 @@ public static function provideTransformationsWithGrouping()
9191
public function testTransformWithGrouping($from, $to, $locale)
9292
{
9393
// Since we test against other locales, we need the full implementation
94-
IntlTestHelper::requireFullIntl($this, false);
94+
IntlTestHelper::requireFullIntl($this);
9595

9696
\Locale::setDefault($locale);
9797

@@ -103,7 +103,7 @@ public function testTransformWithGrouping($from, $to, $locale)
103103
public function testTransformWithScale()
104104
{
105105
// Since we test against "de_AT", we need the full implementation
106-
IntlTestHelper::requireFullIntl($this, false);
106+
IntlTestHelper::requireFullIntl($this);
107107

108108
\Locale::setDefault('de_AT');
109109

@@ -208,7 +208,7 @@ public static function transformWithRoundingProvider()
208208
public function testTransformWithRounding($scale, $input, $output, $roundingMode)
209209
{
210210
// Since we test against "de_AT", we need the full implementation
211-
IntlTestHelper::requireFullIntl($this, false);
211+
IntlTestHelper::requireFullIntl($this);
212212

213213
\Locale::setDefault('de_AT');
214214

@@ -220,7 +220,7 @@ public function testTransformWithRounding($scale, $input, $output, $roundingMode
220220
public function testTransformDoesNotRoundIfNoScale()
221221
{
222222
// Since we test against "de_AT", we need the full implementation
223-
IntlTestHelper::requireFullIntl($this, false);
223+
IntlTestHelper::requireFullIntl($this);
224224

225225
\Locale::setDefault('de_AT');
226226

@@ -235,7 +235,7 @@ public function testTransformDoesNotRoundIfNoScale()
235235
public function testReverseTransform($to, $from, $locale)
236236
{
237237
// Since we test against other locales, we need the full implementation
238-
IntlTestHelper::requireFullIntl($this, false);
238+
IntlTestHelper::requireFullIntl($this);
239239

240240
\Locale::setDefault($locale);
241241

@@ -265,7 +265,7 @@ public function testReverseTransformWithGrouping($to, $from, $locale)
265265
public function testReverseTransformWithGroupingAndFixedSpaces()
266266
{
267267
// Since we test against other locales, we need the full implementation
268-
IntlTestHelper::requireFullIntl($this, false);
268+
IntlTestHelper::requireFullIntl($this);
269269

270270
\Locale::setDefault('ru');
271271

@@ -277,7 +277,7 @@ public function testReverseTransformWithGroupingAndFixedSpaces()
277277
public function testReverseTransformWithGroupingButWithoutGroupSeparator()
278278
{
279279
// Since we test against "de_AT", we need the full implementation
280-
IntlTestHelper::requireFullIntl($this, false);
280+
IntlTestHelper::requireFullIntl($this);
281281

282282
\Locale::setDefault('de_AT');
283283

@@ -442,7 +442,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGro
442442
public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed()
443443
{
444444
// Since we test against other locales, we need the full implementation
445-
IntlTestHelper::requireFullIntl($this, false);
445+
IntlTestHelper::requireFullIntl($this);
446446

447447
\Locale::setDefault('fr');
448448
$transformer = new NumberToLocalizedStringTransformer();
@@ -588,7 +588,7 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
588588
$this->expectException(TransformationFailedException::class);
589589
$this->expectExceptionMessage('The number contains unrecognized characters: "foo8"');
590590
// Since we test against other locales, we need the full implementation
591-
IntlTestHelper::requireFullIntl($this, false);
591+
IntlTestHelper::requireFullIntl($this);
592592

593593
\Locale::setDefault('ru');
594594

@@ -602,7 +602,7 @@ public function testReverseTransformIgnoresTrailingSpacesInExceptionMessage()
602602
$this->expectException(TransformationFailedException::class);
603603
$this->expectExceptionMessage('The number contains unrecognized characters: "foo8"');
604604
// Since we test against other locales, we need the full implementation
605-
IntlTestHelper::requireFullIntl($this, false);
605+
IntlTestHelper::requireFullIntl($this);
606606

607607
\Locale::setDefault('ru');
608608

@@ -625,7 +625,7 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
625625
$this->expectException(TransformationFailedException::class);
626626
$this->expectExceptionMessage('The number contains unrecognized characters: "foo"');
627627
// Since we test against other locales, we need the full implementation
628-
IntlTestHelper::requireFullIntl($this, false);
628+
IntlTestHelper::requireFullIntl($this);
629629

630630
\Locale::setDefault('ru');
631631

src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/PercentToLocalizedStringTransformerTest.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function testTransformWithInteger()
7575
public function testTransformWithScale()
7676
{
7777
// Since we test against "de_AT", we need the full implementation
78-
IntlTestHelper::requireFullIntl($this, false);
78+
IntlTestHelper::requireFullIntl($this);
7979

8080
\Locale::setDefault('de_AT');
8181

@@ -224,7 +224,7 @@ public function testReverseTransformWithInteger()
224224
public function testReverseTransformWithScale()
225225
{
226226
// Since we test against "de_AT", we need the full implementation
227-
IntlTestHelper::requireFullIntl($this, false);
227+
IntlTestHelper::requireFullIntl($this);
228228

229229
\Locale::setDefault('de_AT');
230230

@@ -296,7 +296,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGro
296296
public function testDecimalSeparatorMayBeDotIfGroupingSeparatorIsDotButNoGroupingUsed()
297297
{
298298
// Since we test against other locales, we need the full implementation
299-
IntlTestHelper::requireFullIntl($this, false);
299+
IntlTestHelper::requireFullIntl($this);
300300

301301
\Locale::setDefault('fr');
302302
$transformer = new PercentToLocalizedStringTransformer(1, 'integer', \NumberFormatter::ROUND_HALFUP);
@@ -375,7 +375,7 @@ public function testReverseTransformDisallowsCenteredExtraCharactersMultibyte()
375375
$this->expectException(TransformationFailedException::class);
376376
$this->expectExceptionMessage('The number contains unrecognized characters: "foo8"');
377377
// Since we test against other locales, we need the full implementation
378-
IntlTestHelper::requireFullIntl($this, false);
378+
IntlTestHelper::requireFullIntl($this);
379379

380380
\Locale::setDefault('ru');
381381

@@ -401,7 +401,7 @@ public function testReverseTransformDisallowsTrailingExtraCharactersMultibyte()
401401
$this->expectException(TransformationFailedException::class);
402402
$this->expectExceptionMessage('The number contains unrecognized characters: "foo"');
403403
// Since we test against other locales, we need the full implementation
404-
IntlTestHelper::requireFullIntl($this, false);
404+
IntlTestHelper::requireFullIntl($this);
405405

406406
\Locale::setDefault('ru');
407407

@@ -415,7 +415,7 @@ public function testTransformForHtml5Format()
415415
$transformer = new PercentToLocalizedStringTransformer(null, null, \NumberFormatter::ROUND_HALFUP, true);
416416

417417
// Since we test against "de_CH", we need the full implementation
418-
IntlTestHelper::requireFullIntl($this, false);
418+
IntlTestHelper::requireFullIntl($this);
419419

420420
\Locale::setDefault('de_CH');
421421

@@ -429,7 +429,7 @@ public function testTransformForHtml5FormatWithInteger()
429429
$transformer = new PercentToLocalizedStringTransformer(null, 'integer', \NumberFormatter::ROUND_HALFUP, true);
430430

431431
// Since we test against "de_CH", we need the full implementation
432-
IntlTestHelper::requireFullIntl($this, false);
432+
IntlTestHelper::requireFullIntl($this);
433433

434434
\Locale::setDefault('de_CH');
435435

@@ -440,7 +440,7 @@ public function testTransformForHtml5FormatWithInteger()
440440
public function testTransformForHtml5FormatWithScale()
441441
{
442442
// Since we test against "de_CH", we need the full implementation
443-
IntlTestHelper::requireFullIntl($this, false);
443+
IntlTestHelper::requireFullIntl($this);
444444

445445
\Locale::setDefault('de_CH');
446446

@@ -452,7 +452,7 @@ public function testTransformForHtml5FormatWithScale()
452452
public function testReverseTransformForHtml5Format()
453453
{
454454
// Since we test against "de_CH", we need the full implementation
455-
IntlTestHelper::requireFullIntl($this, false);
455+
IntlTestHelper::requireFullIntl($this);
456456

457457
\Locale::setDefault('de_CH');
458458

@@ -466,7 +466,7 @@ public function testReverseTransformForHtml5Format()
466466
public function testReverseTransformForHtml5FormatWithInteger()
467467
{
468468
// Since we test against "de_CH", we need the full implementation
469-
IntlTestHelper::requireFullIntl($this, false);
469+
IntlTestHelper::requireFullIntl($this);
470470

471471
\Locale::setDefault('de_CH');
472472

@@ -481,7 +481,7 @@ public function testReverseTransformForHtml5FormatWithInteger()
481481
public function testReverseTransformForHtml5FormatWithScale()
482482
{
483483
// Since we test against "de_CH", we need the full implementation
484-
IntlTestHelper::requireFullIntl($this, false);
484+
IntlTestHelper::requireFullIntl($this);
485485

486486
\Locale::setDefault('de_CH');
487487

@@ -546,7 +546,7 @@ class PercentToLocalizedStringTransformerWithoutGrouping extends PercentToLocali
546546
protected function getNumberFormatter(): \NumberFormatter
547547
{
548548
$formatter = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::DECIMAL);
549-
$formatter->setAttribute(\NumberFormatter::GROUPING_USED, false);
549+
$formatter->setAttribute(\NumberFormatter::GROUPING_USED, 0);
550550

551551
return $formatter;
552552
}

0 commit comments

Comments
 (0)