File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/com/magento/idea/magento2plugin/inspections/php Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2121
2222public class ModuleDeclarationInRegistrationPhpInspection extends PhpInspection {
2323
24- @ NotNull
2524 @ Override
26- public PsiElementVisitor buildVisitor (
25+ public @ NotNull PsiElementVisitor buildVisitor (
2726 final @ NotNull ProblemsHolder problemsHolder ,
2827 final boolean isOnTheFly
2928 ) {
@@ -33,19 +32,22 @@ public PsiElementVisitor buildVisitor(
3332 public void visitPhpStringLiteralExpression (final StringLiteralExpression expression ) {
3433 final PsiFile file = expression .getContainingFile ();
3534 final String filename = file .getName ();
36- if (!filename .equals (RegistrationPhp .FILE_NAME )) {
35+
36+ if (!RegistrationPhp .FILE_NAME .equals (filename )) {
3737 return ;
3838 }
39+
3940 if (!IsFileInEditableModuleUtil .execute (file )) {
4041 return ;
4142 }
4243 final String expectedName = GetEditableModuleNameByRootFileUtil .execute (file );
4344 final String actualName = expression .getContents ();
45+
4446 if (actualName .equals (expectedName )) {
4547 return ;
4648 }
47-
4849 final InspectionBundle inspectionBundle = new InspectionBundle ();
50+
4951 problemsHolder .registerProblem (
5052 expression ,
5153 inspectionBundle .message (
You can’t perform that action at this time.
0 commit comments