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 1818
1919trait 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 }
You can’t perform that action at this time.
0 commit comments