File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/com/magento/idea/magento2plugin/inspections/xml Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2121import com .magento .idea .magento2plugin .magento .files .ModuleDiXml ;
2222import org .jetbrains .annotations .NotNull ;
2323
24+ @ SuppressWarnings ({"PMD.ExcessiveMethodLength" , "PMD.NPathComplexity" })
2425public 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 ) {
You can’t perform that action at this time.
0 commit comments