Skip to content

Commit 11cd9be

Browse files
committed
[Resistor Duo analyzer (#127)] Rename helper method
1 parent b618050 commit 11cd9be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/analyzers/practice/resistor-color-duo/ResistorColorDuoSolution.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ class Entry {
515515
}
516516

517517
if (!constant) {
518-
const issue = this.checkForShouldDefineTopLevelConstantIssue()
518+
const issue = this.hasConstantDefinedInBody()
519519
if (issue instanceof ShouldDefineTopLevelConstant) {
520520
logger.log('~> found a constant that was not declared at the top level')
521521
this.lastIssue_ = issue
@@ -1127,9 +1127,7 @@ class Entry {
11271127
return false
11281128
}
11291129

1130-
private checkForShouldDefineTopLevelConstantIssue():
1131-
| ShouldDefineTopLevelConstant
1132-
| undefined {
1130+
private hasConstantDefinedInBody(): ShouldDefineTopLevelConstant | undefined {
11331131
const localConstants = extractVariables(this.body).filter(
11341132
(constant) =>
11351133
constant.init?.type === AST_NODE_TYPES.ArrayExpression ||

0 commit comments

Comments
 (0)