8000 [Validator] simplified some code · symfony/symfony@cca8905 · GitHub
[go: up one dir, main page]

Skip to content
65F7

Commit cca8905

Browse files
committed
[Validator] simplified some code
1 parent 6cd2873 commit cca8905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class ElementMetadata extends GenericMetadata
2323
{
2424
public function __construct()
2525
{
26-
if (__CLASS__ === get_class($this) || !in_array(get_parent_class($this), array('Symfony\Component\Validator\Mapping\MemberMetadata', 'Symfony\Component\Validator\Mapping\ClassMetadata'))) {
26+
if (!$this instanceof MemberMetadata && !$this instanceof ClassMetadata) {
2727
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED);
2828
}
2929
}

0 commit comments

Comments
 (0)
0