File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 18
18
19
19
trait ValidatorExtensionTrait
20
20
{
21
+ /**
22
+ * @var ValidatorInterface|null
23
+ */
21
24
protected $ validator ;
22
25
26
+ /**
27
+ * @return ValidatorExtension
28
+ */
23
29
protected function getValidatorExtension ()
24
30
{
25
31
if (!interface_exists (ValidatorInterface::class)) {
@@ -31,9 +37,9 @@ protected function getValidatorExtension()
31
37
}
32
38
33
39
$ 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 ();
35
41
$ 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 ([] ));
37
43
38
44
return new ValidatorExtension ($ this ->validator );
39
45
}
You can’t perform that action at this time.
0 commit comments