Skip to content

Commit 6392cfd

Browse files
Vitaliycoderimus
andauthored
Update src/com/magento/idea/magento2plugin/actions/generation/CreateAPluginAction.java
Co-Authored-By: Alexander Shkurko <[email protected]>
1 parent 872153c commit 6392cfd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/com/magento/idea/magento2plugin/actions/generation/CreateAPluginAction.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ public void update(AnActionEvent event) {
4444
Pair<PsiFile, PhpClass> pair = this.findPhpClass(event);
4545
PsiFile psiFile = pair.getFirst();
4646
PhpClass phpClass = pair.getSecond();
47-
if (phpClass == null || psiFile == null) {
47+
if ((phpClass == null || psiFile == null)
48+
|| !(psiFile instanceof PhpFile)
49+
|| phpClass.isFinal()
50+
|| this.targetMethod == null
51+
) {
4852
this.setStatus(event, false);
4953
return;
5054
}
5155
targetClass = phpClass;
52-
if (!(psiFile instanceof PhpFile) || phpClass.isFinal() || this.targetMethod == null) {
53-
this.setStatus(event, false);
54-
return;
55-
}
5656
this.setStatus(event, true);
5757
return;
5858
}

0 commit comments

Comments
 (0)