Skip to content

Commit

Permalink
Merge pull request #2330 from Haehnchen/feature/noise-filter
Browse files Browse the repository at this point in the history
reduce noise for Twig chaining method filter completion
  • Loading branch information
Haehnchen authored Apr 1, 2024
2 parents a1ff573 + fb4ec0a commit a669635
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,8 @@ public static Collection<TwigExtensionLookupElement> getTypesFilters(@NotNull Pr
// add typed filters
for (String type : twigExtension.getTypes()) {
PhpClass phpClass = PhpElementsUtil.getClassInterface(project, type);
if (phpClass != null) {
for (Method method : phpClass.getMethods().stream().filter(m -> m.getAccess().isPublic() && !m.getName().startsWith("__")).toList()) {
if (phpClass != null && !PhpElementsUtil.isInstanceOf(phpClass, "\\DateTimeInterface")) {
for (Method method : phpClass.getMethods().stream().filter(m -> m.getAccess().isPublic() && !m.isAbstract() && !m.isStatic() && !m.getName().startsWith("__")).toList()) {
lookupElements.add(new TwigExtensionLookupElement(project, key + "." + method.getName(), twigExtension));
}
}
Expand Down

0 comments on commit a669635

Please sign in to comment.