Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit adc1437

Browse files
committed
[Validator] Fixed failing tests
1 parent 4ea3ff6 commit adc1437

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/Symfony/Component/Validator/Mapping/AdHocMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @since %%NextVersion%%
1919
* @author Bernhard Schussek <[email protected]>
2020
*/
21-
class AdHocMetadata extends ElementMetadata
21+
class AdHocMetadata extends ElementMetadata implements MetadataInterface
2222
{
2323
public function __construct(array $constraints)
2424
{

src/Symfony/Component/Validator/Mapping/ClassMetadata.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use Symfony\Component\Validator\Constraints\GroupSequence;
1515
use Symfony\Component\Validator\ValidationVisitorInterface;
1616
use Symfony\Component\Validator\PropertyMetadataContainerInterface;
17-
use Symfony\Component\Validator\ClassBasedInterface;
18-
use Symfony\Component\Validator\MetadataInterface;
17+
use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface;
1918
use Symfony\Component\Validator\Constraint;
2019
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
2120
use Symfony\Component\Validator\Exception\GroupDefinitionException;
@@ -26,7 +25,7 @@
2625
* @author Bernhard Schussek <[email protected]>
2726
* @author Fabien Potencier <[email protected]>
2827
*/
29-
class ClassMetadata extends ElementMetadata implements MetadataInterface, ClassBasedInterface, PropertyMetadataContainerInterface, ClassMetadataInterface
28+
class ClassMetadata extends ElementMetadata implements LegacyMetadataInterface, PropertyMetadataContainerInterface, ClassMetadataInterface
3029
{
3130
/**
3231
* @var string

src/Symfony/Component/Validator/Mapping/ElementMetadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use Symfony\Component\Validator\Constraint;
1515

16-
abstract class ElementMetadata implements MetadataInterface
16+
abstract class ElementMetadata
1717
{
1818
/**
1919
* @var Constraint[]

src/Symfony/Component/Validator/Mapping/MemberMetadata.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function getTraversalStrategy()
177177
*/
178178
public function isCascaded()
179179
{
180-
return $this->cascadingStrategy & CascadingStrategy::CASCADE;
180+
return (boolean) ($this->cascadingStrategy & CascadingStrategy::CASCADE);
181181
}
182182

183183
/**
@@ -188,7 +188,7 @@ public function isCascaded()
188188
*/
189189
public function isCollectionCascaded()
190190
{
191-
return $this->traversalStrategy & TraversalStrategy::TRAVERSE;
191+
return (boolean) ($this->traversalStrategy & TraversalStrategy::TRAVERSE);
192192
}
193193

194194
/**
@@ -199,7 +199,7 @@ public function isCollectionCascaded()
199199
*/
200200
public function isCollectionCascadedDeeply()
201201
{
202-
return $this->traversalStrategy & TraversalStrategy::RECURSIVE;
202+
return (boolean) ($this->traversalStrategy & TraversalStrategy::RECURSIVE);
203203
}
204204

205205
/**

0 commit comments

Comments
 (0)