Skip to content

Commit 433873d

Browse files
committed
Static fixes
1 parent 75e97d0 commit 433873d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/com/magento/idea/magento2plugin/inspections/xml/ModuleScopeInspection.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import com.intellij.codeInspection.ProblemHighlightType;
99
import com.intellij.codeInspection.ProblemsHolder;
1010
import com.intellij.codeInspection.XmlSuppressableInspectionTool;
11-
import com.intellij.openapi.vfs.VirtualFile;
1211
import com.intellij.psi.PsiDirectory;
1312
import com.intellij.psi.PsiElementVisitor;
1413
import com.intellij.psi.PsiFile;
@@ -19,18 +18,19 @@
1918
import com.magento.idea.magento2plugin.magento.packages.Package;
2019
import com.magento.idea.magento2plugin.util.magento.GetMagentoModuleUtil;
2120
import org.jetbrains.annotations.NotNull;
22-
import java.util.*;
2321

2422
public class ModuleScopeInspection extends XmlSuppressableInspectionTool {
2523

24+
/**
25+
* Inspection for the module config area.
26+
*/
2627
@NotNull
2728
@SuppressWarnings({"PMD.AvoidInstantiatingObjectsInLoops", "PMD.CognitiveComplexity"})
2829
public PsiElementVisitor buildVisitor(
2930
final @NotNull ProblemsHolder problemsHolder,
3031
final boolean isOnTheFly
3132
) {
3233
return new XmlElementVisitor() {
33-
private final HashMap<String, VirtualFile> loadedFileHash = new HashMap<>();//NOPMD
3434
private final InspectionBundle inspectionBundle = new InspectionBundle();
3535
private final ProblemHighlightType errorSeverity = ProblemHighlightType.WARNING;
3636

@@ -53,7 +53,8 @@ public void visitFile(final @NotNull PsiFile file) {
5353
final GetMagentoModuleUtil.MagentoModuleData moduleData = GetMagentoModuleUtil
5454
.getByContext(targetDirectory, file.getProject());
5555

56-
if (moduleData == null || moduleData.getType() == null || !moduleData.getType().equals(ComponentType.module)) {
56+
if (moduleData == null || moduleData.getType() == null
57+
|| !moduleData.getType().equals(ComponentType.module)) {
5758
return;
5859
}
5960

tests/com/magento/idea/magento2plugin/inspections/xml/ModuleScopeInspectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public void setUp() throws Exception {
1717
}
1818

1919
/**
20-
* Inspection highlights warning if the area of a config file is wrong
20+
* Inspection highlights warning if the area of a config file is wrong.
2121
*/
2222
public void testIncorrectArea() {
2323
configureFixture("app/code/Test/TestModule/etc/adminhtmltypo/di.xml");

0 commit comments

Comments
 (0)