Skip to content

Commit 2ef13ef

Browse files
committed
cousing -> sibling
1 parent f55005a commit 2ef13ef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

javascript/ql/src/Expressions/ImplicitOperandConversion.ql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,23 +163,23 @@ class PlusConversion extends NullOrUndefinedConversion {
163163
PlusConversion() { parent instanceof AddExpr or parent instanceof AssignAddExpr }
164164

165165
override string getConversionTarget() {
166-
result = getDefiniteCousinType()
166+
result = getDefiniteSiblingType()
167167
or
168-
not exists(getDefiniteCousinType()) and
168+
not exists(getDefiniteSiblingType()) and
169169
result = "number or string"
170170
}
171171

172172
/**
173-
* Gets the cousin of this implicit conversion.
174-
* E.g. if this is `a` in the expression `a + b`, then the cousin is `b`.
173+
* Gets the sibling of this implicit conversion.
174+
* E.g. if this is `a` in the expression `a + b`, then the sibling is `b`.
175175
*/
176-
private Expr getCousin() { result = parent.getAChild() and not result = this.getEnclosingExpr() }
176+
private Expr getSibling() { result = parent.getAChild() and not result = this.getEnclosingExpr() }
177177

178178
/**
179-
* Gets the unique type of the cousin expression, if that type is `string` or `number`.
179+
* Gets the unique type of the sibling expression, if that type is `string` or `number`.
180180
*/
181-
private string getDefiniteCousinType() {
182-
result = unique(InferredType t | t = getCousin().flow().analyze().getAType()).getTypeofTag() and
181+
private string getDefiniteSiblingType() {
182+
result = unique(InferredType t | t = getSibling().flow().analyze().getAType()).getTypeofTag() and
183183
result = ["string", "number"]
184184
}
185185
}

0 commit comments

Comments
 (0)