• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Camelcade / Perl5-IDEA / #525521563

01 Jun 2025 02:15PM UTC coverage: 82.332% (+0.04%) from 82.289%
#525521563

push

github

hurricup
Bounded wildcards

2 of 2 new or added lines in 2 files covered. (100.0%)

69 existing lines in 17 files now uncovered.

30882 of 37509 relevant lines covered (82.33%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/plugin/core/src/main/java/com/perl5/lang/perl/psi/PerlVariableDeclarationExpr.java
1
/*
2
 * Copyright 2015-2025 Alexandr Evstigneev
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.perl5.lang.perl.psi;
18

19
import com.intellij.psi.PsiElement;
20
import com.intellij.psi.tree.IElementType;
21
import com.intellij.psi.util.PsiUtilCore;
22
import com.perl5.lang.perl.lexer.PerlTokenSetsEx;
23
import com.perl5.lang.perl.psi.properties.PerlLexicalScopeMember;
24
import com.perl5.lang.perl.psi.properties.PerlNamespaceElementContainer;
25
import org.jetbrains.annotations.NotNull;
26
import org.jetbrains.annotations.Nullable;
27

28
import java.util.List;
29
import java.util.stream.Collectors;
30

31
import static com.perl5.lang.perl.parser.PerlElementTypesGenerated.LEFT_PAREN;
32

33
/**
34
 * Common interface for my/our/local/state declarations
35
 */
36
public interface PerlVariableDeclarationExpr extends PsiPerlExpr, PerlNamespaceElementContainer, PerlLexicalScopeMember {
37
  /**
38
   * Returns explicit declared type
39
   *
40
   * @return declaration type name or null
41
   */
42
  @Nullable
43
  String getDeclarationType();
44

45
  @SuppressWarnings("override")
46
  @NotNull
47
  List<PsiPerlVariableDeclarationElement> getVariableDeclarationElementList();
48

49
  default @NotNull List<PerlVariable> getVariables() {
50
    return getVariableDeclarationElementList().stream()
1✔
51
      .map(PerlVariableDeclarationElement::getVariable)
1✔
52
      .collect(Collectors.toList());
1✔
53
  }
54

55
  /**
56
   * @return true iff declaration is parenthesized
57
   */
58
  default boolean isParenthesized() {
59
    PsiElement run = getFirstChild();
1✔
60
    while ((run = run.getNextSibling()) != null) {
1✔
61
      IElementType elementType = PsiUtilCore.getElementType(run);
1✔
62
      if (!PerlTokenSetsEx.getMEANINGLESS_TOKENS().contains(elementType)) {
1✔
63
        return elementType == LEFT_PAREN;
1✔
64
      }
65
    }
1✔
UNCOV
66
    return false;
×
67
  }
68
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc