Skip to content

Commit 7b9addc

Browse files
committed
Fix CS
1 parent 68ce84e commit 7b9addc

File tree

3 files changed

+40
-40
lines changed

3 files changed

+40
-40
lines changed

Normalizer/AbstractNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ protected function isCircularReference($object, &$context)
304304
*
305305
* @throws CircularReferenceException
306306
*/
307-
protected function handleCircularReference($object/*, string $format = null, array $context = []*/)
307+
protected function handleCircularReference($object/* , string $format = null, array $context = [] */)
308308
{
309309
if (\func_num_args() < 2 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface && !$this instanceof \Mockery\MockInterface) {
310310
@trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = []" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED);
@@ -542,7 +542,7 @@ protected function denormalizeParameter(\ReflectionClass $class, \ReflectionPara
542542
*
543543
* @internal
544544
*/
545-
protected function createChildContext(array $parentContext, $attribute/*, ?string $format */): array
545+
protected function createChildContext(array $parentContext, $attribute/* , ?string $format */): array
546546
{
547547
if (\func_num_args() < 3) {
548548
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', static::class, __FUNCTION__), \E_USER_DEPRECATED);

Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ private function isMaxDepthReached(array $attributesMetadata, string $class, str
647647
*
648648
* @internal
649649
*/
650-
protected function createChildContext(array $parentContext, $attribute/*, ?string $format */): array
650+
protected function createChildContext(array $parentContext, $attribute/* , ?string $format */): array
651651
{
652652
if (\func_num_args() >= 3) {
653653
$format = func_get_arg(2);

Tests/Encoder/CsvEncoderTest.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testTrueFalseValues()
4747
foo,2,0,1,1,1
4848

4949
CSV
50-
, $this->encoder->encode($data, 'csv'));
50+
, $this->encoder->encode($data, 'csv'));
5151

5252
$this->assertSame([
5353
'string' => 'foo',
@@ -69,7 +69,7 @@ public function testDoubleQuotesAndSlashes()
6969
,"""","foo""","\""",\,foo\
7070

7171
CSV
72-
, $this->encoder->encode($data = ['', '"', 'foo"', '\\"', '\\', 'foo\\'], 'csv'));
72+
, $this->encoder->encode($data = ['', '"', 'foo"', '\\"', '\\', 'foo\\'], 'csv'));
7373

7474
$this->assertSame($data, $this->encoder->decode($csv, 'csv', [CsvEncoder::AS_COLLECTION_KEY => false]));
7575
}
@@ -99,7 +99,7 @@ public function testEncode()
9999
hello,"hey ho"
100100

101101
CSV
102-
, $this->encoder->encode($value, 'csv'));
102+
, $this->encoder->encode($value, 'csv'));
103103
}
104104

105105
public function testEncodeCollection()
@@ -115,7 +115,7 @@ public function testEncodeCollection()
115115
hi,"let's go"
116116

117117
CSV
118-
, $this->encoder->encode($value, 'csv'));
118+
, $this->encoder->encode($value, 'csv'));
119119
}
120120

121121
public function testEncodePlainIndexedArray()
@@ -150,7 +150,7 @@ public function testEncodeNestedArrays()
150150
hello,yo,wesh,Halo,olá
151151

152152
CSV
153-
, $this->encoder->encode($value, 'csv'));
153+
, $this->encoder->encode($value, 'csv'));
154154
}
155155

156156
public function testEncodeCustomSettings()
@@ -183,7 +183,7 @@ private function doTestEncodeCustomSettings(bool $legacy = false)
183183
'he''llo';foo
184184

185185
CSV
186-
, $this->encoder->encode($value, 'csv'));
186+
, $this->encoder->encode($value, 'csv'));
187187
}
188188

189189
public function testEncodeCustomSettingsPassedInContext()
@@ -195,12 +195,12 @@ public function testEncodeCustomSettingsPassedInContext()
195195
'he''llo';foo
196196

197197
CSV
198-
, $this->encoder->encode($value, 'csv', [
199-
CsvEncoder::DELIMITER_KEY => ';',
200-
CsvEncoder::ENCLOSURE_KEY => "'",
201-
CsvEncoder::ESCAPE_CHAR_KEY => '|',
202-
CsvEncoder::KEY_SEPARATOR_KEY => '-',
203-
]));
198+
, $this->encoder->encode($value, 'csv', [
199+
CsvEncoder::DELIMITER_KEY => ';',
200+
CsvEncoder::ENCLOSURE_KEY => "'",
201+
CsvEncoder::ESCAPE_CHAR_KEY => '|',
202+
CsvEncoder::KEY_SEPARATOR_KEY => '-',
203+
]));
204204
}
205205

206206
public function testEncodeCustomSettingsPassedInConstructor()
@@ -218,7 +218,7 @@ public function testEncodeCustomSettingsPassedInConstructor()
218218
'he''llo';foo
219219

220220
CSV
221-
, $encoder->encode($value, 'csv'));
221+
, $encoder->encode($value, 'csv'));
222222
}
223223

224224
public function testEncodeEmptyArray()
@@ -527,7 +527,7 @@ public function testDecodeLegacy()
527527
foo,bar
528528
a,b
529529
CSV
530-
, 'csv'));
530+
, 'csv'));
531531
}
532532

533533
public function testDecodeAsSingle()
@@ -538,7 +538,7 @@ public function testDecodeAsSingle()
538538
foo,bar
539539
a,b
540540
CSV
541-
, 'csv', [CsvEncoder::AS_COLLECTION_KEY => false]));
541+
, 'csv', [CsvEncoder::AS_COLLECTION_KEY => false]));
542542
}
543543

544544
public function testDecodeCollection()
@@ -556,7 +556,7 @@ public function testDecodeCollection()
556556
f
557557

558558
CSV
559-
, 'csv'));
559+
, 'csv'));
560560
}
561561

562562
public function testDecode()
@@ -570,9 +570,9 @@ public function testDecode()
570570
a
571571

572572
CSV
573-
, 'csv', [
574-
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
575-
]));
573+
, 'csv', [
574+
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
575+
]));
576576
}
577577

578578
public function testDecodeToManyRelation()
@@ -606,7 +606,7 @@ public function testDecodeNestedArrays()
606606
a,b
607607
c,d
608608
CSV
609-
, 'csv'));
609+
, 'csv'));
610610
}
611611

612612
public function testDecodeCustomSettings()
@@ -637,9 +637,9 @@ private function doTestDecodeCustomSettings(bool $legacy = false)
637637
a;bar-baz
638638
'hell''o';b;c
639639
CSV
640-
, 'csv', [
641-
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
642-
]));
640+
, 'csv', [
641+
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
642+
]));
643643
}
644644

645645
public function testDecodeCustomSettingsPassedInContext()
@@ -649,13 +649,13 @@ public function testDecodeCustomSettingsPassedInContext()
649649
a;bar-baz
650650
'hell''o';b;c
651651
CSV
652-
, 'csv', [
653-
CsvEncoder::DELIMITER_KEY => ';',
654-
CsvEncoder::ENCLOSURE_KEY => "'",
655-
CsvEncoder::ESCAPE_CHAR_KEY => '|',
656-
CsvEncoder::KEY_SEPARATOR_KEY => '-',
657-
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
658-
]));
652+
, 'csv', [
653+
CsvEncoder::DELIMITER_KEY => ';',
654+
CsvEncoder::ENCLOSURE_KEY => "'",
655+
CsvEncoder::ESCAPE_CHAR_KEY => '|',
656+
CsvEncoder::KEY_SEPARATOR_KEY => '-',
657+
CsvEncoder::AS_COLLECTION_KEY => true, // Can be removed in 5.0
658+
]));
659659
}
660660

661661
public function testDecodeCustomSettingsPassedInConstructor()
@@ -672,7 +672,7 @@ public function testDecodeCustomSettingsPassedInConstructor()
672672
a;bar-baz
673673
'hell''o';b;c
674674
CSV
675-
, 'csv'));
675+
, 'csv'));
676676
}
677677

678678
public function testDecodeMalformedCollection()
@@ -705,18 +705,18 @@ public function testDecodeWithoutHeader()
705705
c,d
706706

707707
CSV
708-
, 'csv', [
709-
CsvEncoder::NO_HEADERS_KEY => true,
710-
]));
708+
, 'csv', [
709+
CsvEncoder::NO_HEADERS_KEY => true,
710+
]));
711711
$encoder = new CsvEncoder([CsvEncoder::NO_HEADERS_KEY => true]);
712712
$this->assertEquals([['a', 'b'], ['c', 'd']], $encoder->decode(<<<'CSV'
713713
a,b
714714
c,d
715715

716716
CSV
717-
, 'csv', [
718-
CsvEncoder::NO_HEADERS_KEY => true,
719-
]));
717+
, 'csv', [
718+
CsvEncoder::NO_HEADERS_KEY => true,
719+
]));
720720
}
721721

722722
public function testBOMIsAddedOnDemand()

0 commit comments

Comments
 (0)