mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Refactor GrapeHeadersBlockCall and GrapeCookiesBlockCall to simplify method call checks
This commit is contained in:
@@ -237,11 +237,8 @@ module Grape {
|
|||||||
*/
|
*/
|
||||||
private class GrapeHeadersBlockCall extends MethodCall {
|
private class GrapeHeadersBlockCall extends MethodCall {
|
||||||
GrapeHeadersBlockCall() {
|
GrapeHeadersBlockCall() {
|
||||||
exists(GrapeApiClass api |
|
this = grapeApiInstance().getAMethodCall("headers").asExpr().getExpr() and
|
||||||
this.getParent+() = api.getADeclaration() and
|
exists(this.getBlock())
|
||||||
this.getMethodName() = "headers" and
|
|
||||||
exists(this.getBlock())
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,11 +248,8 @@ module Grape {
|
|||||||
*/
|
*/
|
||||||
private class GrapeCookiesBlockCall extends MethodCall {
|
private class GrapeCookiesBlockCall extends MethodCall {
|
||||||
GrapeCookiesBlockCall() {
|
GrapeCookiesBlockCall() {
|
||||||
exists(GrapeApiClass api |
|
this = grapeApiInstance().getAMethodCall("cookies").asExpr().getExpr() and
|
||||||
this.getParent+() = api.getADeclaration() and
|
exists(this.getBlock())
|
||||||
this.getMethodName() = "cookies" and
|
|
||||||
exists(this.getBlock())
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user