Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c85707

Browse filesBrowse files
ro0NLfabpot
authored andcommitted
[Form] SA fix
1 parent 78e6f28 commit 1c85707
Copy full SHA for 1c85707

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed

‎src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Test/Traits/ValidatorExtensionTrait.php
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@
1818

1919
trait ValidatorExtensionTrait
2020
{
21+
/**
22+
* @var ValidatorInterface|null
23+
*/
2124
protected $validator;
2225

26+
/**
27+
* @return ValidatorExtension
28+
*/
2329
protected function getValidatorExtension()
2430
{
2531
if (!interface_exists(ValidatorInterface::class)) {
@@ -31,9 +37,9 @@ protected function getValidatorExtension()
3137
}
3238

3339
$this->validator = $this->getMockBuilder(ValidatorInterface::class)->getMock();
34-
$metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->setMethods(array('addPropertyConstraint'))->getMock();
40+
$metadata = $this->getMockBuilder(ClassMetadata::class)->disableOriginalConstructor()->setMethods(['addPropertyConstraint'])->getMock();
3541
$this->validator->expects($this->any())->method('getMetadataFor')->will($this->returnValue($metadata));
36-
$this->validator->expects($this->any())->method('validate')->will($this->returnValue(array()));
42+
$this->validator->expects($this->any())->method('validate')->will($this->returnValue([]));
3743

3844
return new ValidatorExtension($this->validator);
3945
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.