Skip to content

Commit 447b7ef

Browse files
committed
Fix CS
1 parent 9b7ee6f commit 447b7ef

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

Annotation/Context.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class Context
3838
public function __construct(array $options = [], array $context = [], array $normalizationContext = [], array $denormalizationContext = [], $groups = [])
3939
{
4040
if (!$context) {
41-
if (!array_intersect((array_keys($options)), ['normalizationContext', 'groups', 'context', 'value', 'denormalizationContext'])) {
41+
if (!array_intersect(array_keys($options), ['normalizationContext', 'groups', 'context', 'value', 'denormalizationContext'])) {
4242
// gracefully supports context as first, unnamed attribute argument if it cannot be confused with Doctrine-style options
4343
$context = $options;
4444
} else {

Tests/Encoder/CsvEncoderTest.php

Lines changed: 31 additions & 31 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()
@@ -169,7 +169,7 @@ public function testEncodeCustomSettings()
169169
'he''llo';foo
170170

171171
CSV
172-
, $this->encoder->encode($value, 'csv'));
172+
, $this->encoder->encode($value, 'csv'));
173173
}
174174

175175
public function testEncodeCustomSettingsPassedInContext()
@@ -181,12 +181,12 @@ public function testEncodeCustomSettingsPassedInContext()
181181
'he''llo';foo
182182

183183
CSV
184-
, $this->encoder->encode($value, 'csv', [
185-
CsvEncoder::DELIMITER_KEY => ';',
186-
CsvEncoder::ENCLOSURE_KEY => "'",
187-
CsvEncoder::ESCAPE_CHAR_KEY => '|',
188-
CsvEncoder::KEY_SEPARATOR_KEY => '-',
189-
]));
184+
, $this->encoder->encode($value, 'csv', [
185+
CsvEncoder::DELIMITER_KEY => ';',
186+
CsvEncoder::ENCLOSURE_KEY => "'",
187+
CsvEncoder::ESCAPE_CHAR_KEY => '|',
188+
CsvEncoder::KEY_SEPARATOR_KEY => '-',
189+
]));
190190
}
191191

192192
public function testEncodeCustomSettingsPassedInConstructor()
@@ -204,7 +204,7 @@ public function testEncodeCustomSettingsPassedInConstructor()
204204
'he''llo';foo
205205

206206
CSV
207-
, $encoder->encode($value, 'csv'));
207+
, $encoder->encode($value, 'csv'));
208208
}
209209

210210
public function testEncodeEmptyArray()
@@ -495,7 +495,7 @@ public function testDecodeAsSingle()
495495
foo,bar
496496
a,b
497497
CSV
498-
, 'csv', [CsvEncoder::AS_COLLECTION_KEY => false]));
498+
, 'csv', [CsvEncoder::AS_COLLECTION_KEY => false]));
499499
}
500500

501501
public function testDecodeCollection()
@@ -513,7 +513,7 @@ public function testDecodeCollection()
513513
f
514514

515515
CSV
516-
, 'csv'));
516+
, 'csv'));
517517
}
518518

519519
public function testDecode()
@@ -527,7 +527,7 @@ public function testDecode()
527527
a
528528

529529
CSV
530-
, 'csv'));
530+
, 'csv'));
531531
}
532532

533533
public function testDecodeToManyRelation()
@@ -561,7 +561,7 @@ public function testDecodeNestedArrays()
561561
a,b
562562
c,d
563563
CSV
564-
, 'csv'));
564+
, 'csv'));
565565
}
566566

567567
public function testDecodeCustomSettings()
@@ -578,7 +578,7 @@ public function testDecodeCustomSettings()
578578
a;bar-baz
579579
'hell''o';b;c
580580
CSV
581-
, 'csv'));
581+
, 'csv'));
582582
}
583583

584584
public function testDecodeCustomSettingsPassedInContext()
@@ -588,12 +588,12 @@ public function testDecodeCustomSettingsPassedInContext()
588588
a;bar-baz
589589
'hell''o';b;c
590590
CSV
591-
, 'csv', [
592-
CsvEncoder::DELIMITER_KEY => ';',
593-
CsvEncoder::ENCLOSURE_KEY => "'",
594-
CsvEncoder::ESCAPE_CHAR_KEY => '|',
595-
CsvEncoder::KEY_SEPARATOR_KEY => '-',
596-
]));
591+
, 'csv', [
592+
CsvEncoder::DELIMITER_KEY => ';',
593+
CsvEncoder::ENCLOSURE_KEY => "'",
594+
CsvEncoder::ESCAPE_CHAR_KEY => '|',
595+
CsvEncoder::KEY_SEPARATOR_KEY => '-',
596+
]));
597597
}
598598

599599
public function testDecodeCustomSettingsPassedInConstructor()
@@ -610,7 +610,7 @@ public function testDecodeCustomSettingsPassedInConstructor()
610610
a;bar-baz
611611
'hell''o';b;c
612612
CSV
613-
, 'csv'));
613+
, 'csv'));
614614
}
615615

616616
public function testDecodeMalformedCollection()
@@ -643,18 +643,18 @@ public function testDecodeWithoutHeader()
643643
c,d
644644

645645
CSV
646-
, 'csv', [
647-
CsvEncoder::NO_HEADERS_KEY => true,
648-
]));
646+
, 'csv', [
647+
CsvEncoder::NO_HEADERS_KEY => true,
648+
]));
649649
$encoder = new CsvEncoder([CsvEncoder::NO_HEADERS_KEY => true]);
650650
$this->assertEquals([['a', 'b'], ['c', 'd']], $encoder->decode(<<<'CSV'
651651
a,b
652652
c,d
653653

654654
CSV
655-
, 'csv', [
656-
CsvEncoder::NO_HEADERS_KEY => true,
657-
]));
655+
, 'csv', [
656+
CsvEncoder::NO_HEADERS_KEY => true,
657+
]));
658658
}
659659

660660
public function testBOMIsAddedOnDemand()

Tests/Normalizer/FormErrorNormalizerTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function setUp(): void
4242
new FormError('a', 'b', ['c', 'd'], 5, 'f'),
4343
new FormError(1, 2, [3, 4], 5, 6),
4444
])
45-
);
45+
);
4646
}
4747

4848
public function testSupportsNormalizationWithWrongClass()
@@ -130,21 +130,21 @@ public function testNormalizeWithChildren()
130130
->willReturn(new FormErrorIterator($form1, [
131131
new FormError('b'),
132132
])
133-
);
133+
);
134134
$form1->method('getName')->willReturn('form1');
135135

136136
$form2->method('getErrors')
137137
->willReturn(new FormErrorIterator($form1, [
138138
new FormError('c'),
139139
])
140-
);
140+
);
141141
$form2->method('getName')->willReturn('form2');
142142

143143
$form3->method('getErrors')
144144
->willReturn(new FormErrorIterator($form1, [
145145
new FormError('d'),
146146
])
147-
);
147+
);
148148
$form3->method('getName')->willReturn('form3');
149149

150150
$form2->method('all')->willReturn([$form3]);
@@ -156,7 +156,7 @@ public function testNormalizeWithChildren()
156156
->willReturn(new FormErrorIterator($form, [
157157
new FormError('a'),
158158
])
159-
);
159+
);
160160

161161
$this->assertEquals($exptected, $this->normalizer->normalize($form));
162162
}

0 commit comments

Comments
 (0)