8000 [Validator] Renamed validateCollection() to validateObjects() · symfony/symfony@e440690 · GitHub
[go: up one dir, main page]

Skip to content

Commit e440690

Browse files
committed
[Validator] Renamed validateCollection() to validateObjects()
1 parent df41974 commit e440690

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ protected function validateObject($object, $groups = null)
5959
return $this->validator->validateObject($object, $groups);
6060
}
6161

62-
protected function validateCollection($collection, $groups = null, $deep = false)
62+
protected function validateObjects($objects, $groups = null, $deep = false)
6363
{
64-
return $this->validator->validateCollection($collection, $groups, $deep);
64+
return $this->validator->validateObjects($objects, $groups, $deep);
6565
}
6666

6767
protected function validateProperty($object, $propertyName, $groups = null)
@@ -276,7 +276,7 @@ public function testValidateArrayInContext()
276276
->getValidator()
277277
->inContext($context)
278278
->atPath('subpath')
279-
->validateCollection(array('key' => $value->reference))
279+
->validateObjects(array('key' => $value->reference))
280280
;
281281
};
282282

src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ protected function validateObject($object, $groups = null)
5757
return $this->validator->validate($object, $groups);
5858
}
5959

60-
protected function validateCollection($collection, $groups = null, $deep = false)
60+
protected function validateObjects($objects, $groups = null, $deep = false)
6161
{
62-
return $this->validator->validate($collection, $groups, true, $deep);
62+
return $this->validator->validate($objects, $groups, true, $deep);
6363
}
6464

6565
protected function validateProperty($object, $propertyName, $groups = null)

src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ abstract protected function validate($value, $constraints, $groups = null);
6767

6868
abstract protected function validateObject($object, $groups = null);
6969

70-
abstract protected function validateCollection($collection, $groups = null, $deep = false);
70+
abstract protected function validateObjects($objects, $groups = null, $deep = false);
7171

7272
abstract protected function validateProperty($object, $propertyName, $groups = null);
7373

@@ -249,7 +249,7 @@ public function testArray()
249249
'groups' => 'Group',
250250
)));
251251

252-
$violations = $this->validateCollection($array, 'Group');
252+
$violations = $this->validateObjects($array, 'Group');
253253

254254
/** @var ConstraintViolationInterface[] $violations */
255255
$this->assertCount(1, $violations);
@@ -287,7 +287,7 @@ public function testRecursiveArray()
287287
'groups' => 'Group',
288288
)));
289289

290-
$violations = $this->validateCollection($array, 'Group');
290+
$violations = $this->validateObjects($array, 'Group');
291291

292292
/** @var ConstraintViolationInterface[] $violations */
293293
$this->assertCount(1, $violations);
@@ -325,7 +325,7 @@ public function testTraversable()
325325
'groups' => 'Group',
326326
)));
327327

328-
$violations = $this->validateCollection($traversable, 'Group');
328+
$violations = $this->validateObjects($traversable, 'Group');
329329

330330
/** @var ConstraintViolationInterface[] $violations */
331331
$this->assertCount(1, $violations);
@@ -359,7 +359,7 @@ public function testRecursiveTraversableRecursiveTraversalDisabled()
359359
'groups' => 'Group',
360360
)));
361361

362-
$this->validateCollection($traversable, 'Group');
362+
$this->validateObjects($traversable, 'Group');
363363
}
364364

365365
public function testRecursiveTraversableRecursiveTraversalEnabled()
@@ -388,7 +388,7 @@ public function testRecursiveTraversableRecursiveTraversalEnabled()
388388
'groups' => 'Group',
389389
)));
390390

391-
$violations = $this->validateCollection($traversable, 'Group', true);
391+
$violations = $this->validateObjects($traversable, 'Group', true);
392392

393393
/** @var ConstraintViolationInterface[] $violations */
394394
$this->assertCount(1, $violations);

src/Symfony/Component/Validator/Validator/ContextualValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ public function validateObject($object, $groups = null)
110110
return $this;
111111
}
112112

113-
public function validateCollection($collection, $groups = null, $deep = false)
113+
public function validateObjects($objects, $groups = null, $deep = false)
114114
{
115115
$constraint = new Traverse(array(
116116
'traverse' => true,
117117
'deep' => $deep,
118118
));
119119

120-
return $this->validate($collection, $constraint, $groups);
120+
return $this->validate($objects, $constraint, $groups);
121121
}
122122

123123
public function validateProperty($object, $propertyName, $groups = null)

src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function validate($value, $constraints, $groups = null);
5151
*/
5252
public function validateObject($object, $groups = null);
5353

54-
public function validateCollection($collection, $groups = null, $deep = false);
54+
public function validateObjects($objects, $groups = null, $deep = false);
5555

5656
/**
5757
* Validates a property of a value against its current value.

src/Symfony/Component/Validator/Validator/Validator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public function validateObject($object, $groups = null)
9898
->getViolations();
9999
}
100100

101-
public function validateCollection($collection, $groups = null, $deep = false)
101+
public function validateObjects($objects, $groups = null, $deep = false)
102102
{
103-
return $this->startContext($collection)
104-
->validateCollection($collection, $groups, $deep)
103+
return $this->startContext($objects)
104+
->validateObjects($objects, $groups, $deep)
105105
->getViolations();
106106
}
107107

src/Symfony/Component/Validator/Validator/ValidatorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function validate($value, $constraints, $groups = null);
4747
*/
4848
public function validateObject($object, $groups = null);
4949

50-
public function validateCollection($collection, $groups = null, $deep = false);
50+
public function validateObjects($objects, $groups = null, $deep = false);
5151

5252
/**
5353
* Validates a property of a value against its current value.

0 commit comments

Comments
 (0)
0