Skip to content

Commit 354c2f2

Browse files
UCT-715: Refactored used non existent constant inspection
1 parent 4577380 commit 354c2f2

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/com/magento/idea/magento2uct/inspections/php/existence/UsedNonExistentConstant.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,11 @@ protected void execute(
3939
final ClassConstImpl constant,
4040
final ClassConstantReference constantReference
4141
) {
42-
final String constantFqn = constant.getFQN();
43-
44-
if (VersionStateManager.getInstance(project).isExists(constantFqn)) {
45-
return;
46-
}
47-
final PhpClass containingClass = constant.getContainingClass();
48-
49-
if (containingClass == null) {
42+
if (VersionStateManager.getInstance(project).isExists(constant.getFQN())) {
5043
return;
5144
}
52-
final String messageArg = containingClass.getFQN().concat("::").concat(constant.getName());
5345
final String message = SupportedIssue.USED_NON_EXISTENT_CONSTANT.getMessage(
54-
messageArg,
46+
constant.getFQN().replace(".", "::"),
5547
VersionStateManager.getInstance(project).getRemovedInVersion(constant.getFQN())
5648
);
5749

0 commit comments

Comments
 (0)