Skip to content

Commit 9d30b65

Browse files
834: Code refactoring
1 parent ba99c90 commit 9d30b65

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/com/magento/idea/magento2plugin/inspections/php/ModuleDeclarationInRegistrationPhpInspection.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121

2222
public 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(

0 commit comments

Comments
 (0)