Skip to content

Commit d66ee46

Browse files
committed
fixed PMD conflict
1 parent 62fa5a9 commit d66ee46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
2222
import org.jetbrains.annotations.NotNull;
2323

24+
@SuppressWarnings({"PMD.ExcessiveMethodLength", "PMD.NPathComplexity"})
2425
public class PreferenceDeclarationInspection extends XmlSuppressableInspectionTool {
2526

2627
@Override
@@ -46,8 +47,6 @@ public void visitXmlTag(final XmlTag xmlTag) {
4647

4748
final XmlAttribute preferenceForAttribute =
4849
xmlTag.getAttribute(ModuleDiXml.PREFERENCE_ATTR_FOR);
49-
final XmlAttribute preferenceTypeAttribute =
50-
xmlTag.getAttribute(ModuleDiXml.TYPE_ATTR);
5150

5251
if (preferenceForAttribute == null
5352
|| preferenceForAttribute.getValue() == null
@@ -62,6 +61,9 @@ public void visitXmlTag(final XmlTag xmlTag) {
6261
);
6362
}
6463

64+
final XmlAttribute preferenceTypeAttribute =
65+
xmlTag.getAttribute(ModuleDiXml.TYPE_ATTR);
66+
6567
if (preferenceTypeAttribute == null
6668
|| preferenceTypeAttribute.getValue() == null
6769
|| preferenceTypeAttribute.getValueElement() == null) {

0 commit comments

Comments
 (0)