Skip to content

Commit f8d1c69

Browse files
keradusfabpot
authored andcommitted
chore: PHP CS Fixer fixes
1 parent bc1f8c8 commit f8d1c69

11 files changed

+33
-8
lines changed

Constraints/Sequentially.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Sequentially extends Composite
3030
*/
3131
public function __construct(mixed $constraints = null, ?array $groups = null, mixed $payload = null)
3232
{
33-
if (is_array($constraints) && !array_is_list($constraints)) {
33+
if (\is_array($constraints) && !array_is_list($constraints)) {
3434
trigger_deprecation('symfony/validator', '7.3', 'Passing an array of options to configure the "%s" constraint is deprecated, use named arguments instead.', static::class);
3535
}
3636

Constraints/ZeroComparisonConstraintTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public function __construct(?array $options = null, ?string $message = null, ?ar
2929
trigger_deprecation('symfony/validator', '7.3', 'Passing an array of options to configure the "%s" constraint is deprecated, use named arguments instead.', static::class);
3030
}
3131

32-
if (is_array($options) && isset($options['propertyPath'])) {
32+
if (\is_array($options) && isset($options['propertyPath'])) {
3333
throw new ConstraintDefinitionException(\sprintf('The "propertyPath" option of the "%s" constraint cannot be set.', static::class));
3434
}
3535

36-
if (is_array($options) && isset($options['value'])) {
36+
if (\is_array($options) && isset($options['value'])) {
3737
throw new ConstraintDefinitionException(\sprintf('The "value" option of the "%s" constraint cannot be set.', static::class));
3838
}
3939

Tests/Constraints/CardSchemeValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function testNullIsValid()
3131

3232
public function testEmptyStringIsValid()
3333
{
34-
$this->validator->validate('', new CardScheme(schemes:[]));
34+
$this->validator->validate('', new CardScheme(schemes: []));
3535

3636
$this->assertNoViolation();
3737
}

Tests/Constraints/ChoiceValidatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public static function provideConstraintsWithChoicesArray(): iterable
9292

9393
/**
9494
* @group legacy
95+
*
9596
* @dataProvider provideLegacyConstraintsWithChoicesArrayDoctrineStyle
9697
*/
9798
public function testValidChoiceArrayDoctrineStyle(Choice $constraint)
@@ -126,6 +127,7 @@ public static function provideConstraintsWithCallbackFunction(): iterable
126127

127128
/**
128129
* @group legacy
130+
*
129131
* @dataProvider provideLegacyConstraintsWithCallbackFunctionDoctrineStyle
130132
*/
131133
public function testValidChoiceCallbackFunctionDoctrineStyle(Choice $constraint)
@@ -262,6 +264,7 @@ public function testInvalidChoiceMultiple()
262264
->setCode(Choice::NO_SUCH_CHOICE_ERROR)
263265
->assertRaised();
264266
}
267+
265268
/**
266269
* @group legacy
267270
*/

Tests/Constraints/CountValidatorTestCase.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public static function getFiveOrMoreElements()
7171

7272
/**
7373
* @group legacy
74+
*
7475
* @dataProvider getThreeOrLessElements
7576
*/
7677
public function testValidValuesMax($value)
@@ -94,6 +95,7 @@ public function testValidValuesMaxNamed($value)
9495

9596
/**
9697
* @group legacy
98+
*
9799
* @dataProvider getFiveOrMoreElements
98100
*/
99101
public function testValidValuesMin($value)
@@ -117,6 +119,7 @@ public function testValidValuesMinNamed($value)
117119

118120
/**
119121
* @group legacy
122+
*
120123
* @dataProvider getFourElements
121124
*/
122125
public function testValidValuesExact($value)
@@ -140,6 +143,7 @@ public function testValidValuesExactNamed($value)
140143

141144
/**
142145
* @group legacy
146+
*
143147
* @dataProvider getFiveOrMoreElements
144148
*/
145149
public function testTooManyValues($value)
@@ -180,6 +184,7 @@ public function testTooManyValuesNamed($value)
180184

181185
/**
182186
* @group legacy
187+
*
183188
* @dataProvider getThreeOrLessElements
184189
*/
185190
public function testTooFewValues($value)
@@ -220,6 +225,7 @@ public function testTooFewValuesNamed($value)
220225

221226
/**
222227
* @group legacy
228+
*
223229
* @dataProvider getFiveOrMoreElements
224230
*/
225231
public function testTooManyValuesExact($value)

Tests/Constraints/ImageValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public function testInvalidMimeTypeWithNarrowedSetDoctrineStyle()
545545
]));
546546

547547
$this->buildViolation('The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.')
548-
->setParameter('{{ file }}', sprintf('"%s"', $this->image))
548+
->setParameter('{{ file }}', \sprintf('"%s"', $this->image))
549549
->setParameter('{{ type }}', '"image/gif"')
550550
->setParameter('{{ types }}', '"image/jpeg", "image/png"')
551551
->setParameter('{{ name }}', '"test.gif"')

Tests/Constraints/IsbnValidatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public function testValidIsbn10($isbn)
159159

160160
/**
161161
* @group legacy
162+
*
162163
* @dataProvider getInvalidIsbn10
163164
*/
164165
public function testInvalidIsbn10($isbn, $code)
@@ -203,6 +204,7 @@ public function testValidIsbn13($isbn)
203204

204205
/**
205206
* @group legacy
207+
*
206208
* @dataProvider getInvalidIsbn13
207209
*/
208210
public function testInvalidIsbn13($isbn, $code)

Tests/Constraints/LengthValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function testInvalidValuesExactLessThanFour(int|string $value, int $value
271271
$constraint = new Length(
272272
min: 4,
273273
max: 4,
274-
exactMessage: 'myMessage',
274+
exactMessage: 'myMessage',
275275
);
276276

277277
$this->validator->validate($value, $constraint);

Tests/Constraints/RangeValidatorTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public static function getMoreThanTwenty(): array
7171

7272
/**
7373
* @group legacy
74+
*
7475
* @dataProvider getTenToTwenty
7576
*/
7677
public function testValidValuesMin($value)
@@ -94,6 +95,7 @@ public function testValidValuesMinNamed($value)
9495

9596
/**
9697
* @group legacy
98+
*
9799
* @dataProvider getTenToTwenty
98100
*/
99101
public function testValidValuesMax($value)
@@ -117,6 +119,7 @@ public function testValidValuesMaxNamed($value)
117119

118120
/**
119121
* @group legacy
122+
*
120123
* @dataProvider getTenToTwenty
121124
*/
122125
public function testValidValuesMinMax($value)
@@ -140,6 +143,7 @@ public function testValidValuesMinMaxNamed($value)
140143

141144
/**
142145
* @group legacy
146+
*
143147
* @dataProvider getLessThanTen
144148
*/
145149
public function testInvalidValuesMin($value, $formattedValue)
@@ -176,6 +180,7 @@ public function testInvalidValuesMinNamed($value, $formattedValue)
176180

177181
/**
178182
* @group legacy
183+
*
179184
* @dataProvider getMoreThanTwenty
180185
*/
181186
public function testInvalidValuesMax($value, $formattedValue)
@@ -212,6 +217,7 @@ public function testInvalidValuesMaxNamed($value, $formattedValue)
212217

213218
/**
214219
* @group legacy
220+
*
215221
* @dataProvider getMoreThanTwenty
216222
*/
217223
public function testInvalidValuesCombinedMax($value, $formattedValue)
@@ -251,6 +257,7 @@ public function testInvalidValuesCombinedMaxNamed($value, $formattedValue)
251257

252258
/**
253259
* @group legacy
260+
*
254261
* @dataProvider getLessThanTen
255262
*/
256263
public function testInvalidValuesCombinedMin($value, $formattedValue)
@@ -629,6 +636,7 @@ public function testNoViolationOnNullObjectWithPropertyPaths()
629636

630637
/**
631638
* @group legacy
639+
*
632640
* @dataProvider getTenToTwenty
633641
*/
634642
public function testValidValuesMinPropertyPath($value)
@@ -741,6 +749,7 @@ public function testInvalidValuesMaxPropertyPath($value, $formattedValue)
741749

742750
/**
743751
* @group legacy
752+
*
744753
* @dataProvider getMoreThanTwenty
745754
*/
746755
public function testInvalidValuesCombinedMaxPropertyPath($value, $formattedValue)
@@ -792,6 +801,7 @@ public function testInvalidValuesCombinedMaxPropertyPathNamed($value, $formatted
792801

793802
/**
794803
* @group legacy
804+
*
795805
* @dataProvider getLessThanTen
796806
*/
797807
public function testInvalidValuesCombinedMinPropertyPath($value, $formattedValue)

Tests/Constraints/RegexValidatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public function testValidValues($value)
5656

5757
/**
5858
* @group legacy
59+
*
5960
* @dataProvider getValidValuesWithWhitespaces
6061
*/
6162
public function testValidValuesWithWhitespaces($value)
@@ -107,6 +108,7 @@ public static function getValidValuesWithWhitespaces()
107108

108109
/**
109110
* @group legacy
111+
*
110112
* @dataProvider getInvalidValues
111113
*/
112114
public function testInvalidValues($value)

0 commit comments

Comments
 (0)