Skip to content

Commit aeaa13b

Browse files
committed
Fixed CheckStyle issues
1 parent ded1983 commit aeaa13b

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/com/magento/idea/magento2plugin/reference/provider/EventNameReferenceProvider.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5+
56
package com.magento.idea.magento2plugin.reference.provider;
67

78
import com.intellij.openapi.util.text.StringUtil;
@@ -15,14 +16,13 @@
1516
import com.intellij.util.indexing.FileBasedIndex;
1617
import com.jetbrains.php.lang.PhpFileType;
1718
import com.jetbrains.php.lang.psi.PhpFile;
18-
import com.magento.idea.magento2plugin.util.php.PhpPatternsHelper;
1919
import com.magento.idea.magento2plugin.reference.xml.PolyVariantReferenceBase;
2020
import com.magento.idea.magento2plugin.stubs.indexes.EventNameIndex;
21-
import org.jetbrains.annotations.NotNull;
22-
21+
import com.magento.idea.magento2plugin.util.php.PhpPatternsHelper;
2322
import java.util.ArrayList;
2423
import java.util.Collection;
2524
import java.util.List;
25+
import org.jetbrains.annotations.NotNull;
2626

2727
public class EventNameReferenceProvider extends PsiReferenceProvider {
2828

@@ -35,12 +35,14 @@ public PsiReference[] getReferencesByElement(
3535
final String value = StringUtil.unquoteString(element.getText());
3636
final List<PsiReference> psiReferences = new ArrayList<>();
3737
final Collection<VirtualFile> containingFiles = FileBasedIndex.getInstance()
38-
.getContainingFiles(EventNameIndex.KEY, value,
39-
GlobalSearchScope.getScopeRestrictedByFileTypes(
40-
GlobalSearchScope.allScope(element.getProject()),
41-
PhpFileType.INSTANCE
42-
)
43-
);
38+
.getContainingFiles(
39+
EventNameIndex.KEY,
40+
value,
41+
GlobalSearchScope.getScopeRestrictedByFileTypes(
42+
GlobalSearchScope.allScope(element.getProject()),
43+
PhpFileType.INSTANCE
44+
)
45+
);
4446

4547
final PsiManager psiManager = PsiManager.getInstance(element.getProject());
4648
final List<PsiElement> psiElements = new ArrayList<>();
@@ -49,7 +51,7 @@ public PsiReference[] getReferencesByElement(
4951
if (phpFile != null) {
5052
recursiveFill(psiElements, phpFile, value);
5153
if (!psiElements.isEmpty()) {
52-
psiReferences.add(new PolyVariantReferenceBase(element, psiElements));
54+
psiReferences.add(new PolyVariantReferenceBase(element, psiElements));//NOPMD
5355
break;
5456
}
5557
}

tests/com/magento/idea/magento2plugin/reference/BaseReferenceTestCase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ protected void assertHasReferenceToClassMethod(
211211

212212
protected void assertHasReferenceToMethodArgument(final String argument) {
213213
final PsiReference[] references = getElementFromCaret().getReferences();
214-
final String actualArgument = StringUtil.unquoteString(references[references.length - 1].resolve().getText());
214+
final String actualArgument
215+
= StringUtil.unquoteString(references[references.length - 1].resolve().getText());
215216
final PsiElement parameterList = references[0].resolve().getParent();
216217

217218
if (!(parameterList instanceof ParameterList)) {

0 commit comments

Comments
 (0)