Skip to content

Commit 93bf850

Browse files
committed
test TranslatableMessage FQCN
1 parent baad742 commit 93bf850

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Translation/Extractor/Visitor/TranslatableMessageVisitor.php

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

1414
use PhpParser\Node;
1515
use PhpParser\NodeVisitor;
16+
use Symfony\Component\Translation\TranslatableMessage;
1617

1718
/**
1819
* @author Mathieu Santostefano <msantostefano@protonmail.com>
@@ -39,7 +40,7 @@ public function leaveNode(Node $node): ?Node
3940
return null;
4041
}
4142

42-
if (!\in_array('TranslatableMessage', $className->getParts(), true)) {
43+
if (TranslatableMessage::class !== $className->name) {
4344
return null;
4445
}
4546

src/Symfony/Component/Translation/Tests/Fixtures/extractor-php-ast/form-type-visitor/form-type.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
// @see https://github.com/php-translation/extractor/blob/master/tests/Resources/Php/Symfony/ExplicitLabelType.php
32

43
use Symfony\Component\Form\AbstractType;
54
use Symfony\Component\Form\Extension\Core\Type\CollectionType;

0 commit comments

Comments
 (0)