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

Camelcade / Perl5-IDEA / #525521819

12 Apr 2026 11:03AM UTC coverage: 76.189% (+0.1%) from 76.061%
#525521819

push

github

hurricup
[qodana] Suppressed a warning on the api method

14764 of 22542 branches covered (65.5%)

Branch coverage included in aggregate %.

31091 of 37644 relevant lines covered (82.59%)

0.83 hits per line

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

85.71
/plugin/common/src/main/java/com/perl5/lang/perl/psi/PerlVariableDeclarationElement.java
1
/*
2
 * Copyright 2015-2026 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.navigation.NavigationItem;
20
import com.intellij.psi.StubBasedPsiElement;
21
import com.intellij.psi.util.PsiTreeUtil;
22
import com.perl5.PerlIcons;
23
import com.perl5.lang.perl.psi.properties.PerlIdentifierOwner;
24
import com.perl5.lang.perl.psi.stubs.variables.PerlVariableDeclarationStub;
25
import com.perl5.lang.perl.psi.utils.PerlVariableAnnotations;
26
import com.perl5.lang.perl.psi.utils.PerlVariableType;
27
import org.jetbrains.annotations.NotNull;
28
import org.jetbrains.annotations.Nullable;
29

30
import javax.swing.*;
31

32

33
public interface PerlVariableDeclarationElement extends StubBasedPsiElement<PerlVariableDeclarationStub>,
34
                                                        PerlIdentifierOwner,
35
                                                        PerlCompositeElement,
36
                                                        PerlVariableDeclaration,
37
                                                        NavigationItem {
38
  /**
39
   * @return Returns declared variable object
40
   */
41
  @NotNull
42
  PerlVariable getVariable();
43

44
  default @Nullable Icon getIconByType(@NotNull PerlVariableType type) {
45
    if (type == PerlVariableType.ARRAY) {
1✔
46
      return PerlIcons.ARRAY_GUTTER_ICON;
1✔
47
    }
48
    if (type == PerlVariableType.HASH) {
1✔
49
      return PerlIcons.HASH_GUTTER_ICON;
1✔
50
    }
51
    if (type == PerlVariableType.SCALAR) {
1!
52
      return PerlIcons.SCALAR_GUTTER_ICON;
1✔
53
    }
54
    return null;
×
55
  }
56

57
  /**
58
   * Checks if this declaration is lexical. IMPORTANT: builds PSI
59
   *
60
   * @return checking result
61
   */
62
  boolean isLexicalDeclaration();
63

64
  /**
65
   * Checks if this declaration is local. IMPORTANT: builds PSI
66
   *
67
   * @return checking result
68
   */
69
  boolean isLocalDeclaration();
70

71
  /**
72
   * Checks if this declaration is global. IMPORTANT: builds PSI
73
   *
74
   * @return checking result
75
   */
76
  boolean isGlobalDeclaration();
77

78
  /**
79
   * Checks if this is method's invocant declaration. IMPORTANT: builds PSI
80
   *
81
   * @return checking result
82
   */
83
  boolean isInvocantDeclaration();
84

85
  @NotNull
86
  PerlVariableAnnotations getLocalVariableAnnotations();
87

88
  /**
89
   * @return enclosing declaration expression if any
90
   */
91
  default @Nullable PerlVariableDeclarationExpr getDeclarationExpression() {
92
    return PsiTreeUtil.getParentOfType(this, PerlVariableDeclarationExpr.class);
1✔
93
  }
94
}
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