@@ -38,6 +38,7 @@ module ActiveResource {
38
38
this .getSuperclassExpr ( ) = model .getAValueReachableFromSource ( ) .asExpr ( ) .getExpr ( )
39
39
}
40
40
41
+ /** Gets the API node for this model */
41
42
API:: Node getModelApiNode ( ) { result = model }
42
43
43
44
SiteAssignCall getASiteAssignment ( ) { result .getModelClass ( ) = this }
@@ -66,6 +67,7 @@ module ActiveResource {
66
67
this = classMethodCall ( model , _)
67
68
}
68
69
70
+ /** Gets the model class for this call. */
69
71
ModelClass getModelClass ( ) { result .getModelApiNode ( ) = model }
70
72
}
71
73
@@ -79,13 +81,15 @@ module ActiveResource {
79
81
SiteAssignCall ( ) { model = modelApiNode ( ) and this = classMethodCall ( model , "site=" ) }
80
82
81
83
/**
82
- * A node that contributes to the URLs used for HTTP requests by the parent
84
+ * Gets a node that contributes to the URLs used for HTTP requests by the parent
83
85
* class.
84
86
*/
85
87
DataFlow:: Node getAUrlPart ( ) { result = this .getArgument ( 0 ) }
86
88
89
+ /** Gets the model class for this call. */
87
90
ModelClass getModelClass ( ) { result .getModelApiNode ( ) = model }
88
91
92
+ /** Holds if this site value specifies HTTP rather than HTTPS. */
89
93
predicate disablesCertificateValidation ( ) {
90
94
this .getAUrlPart ( ) .asExpr ( ) .getConstantValue ( ) .getString ( ) .regexpMatch ( "^http(^s)" )
91
95
}
@@ -154,6 +158,7 @@ module ActiveResource {
154
158
)
155
159
}
156
160
161
+ /** Gets the model class for this instance. */
157
162
ModelClass getModelClass ( ) { result = cls }
158
163
}
159
164
@@ -165,9 +170,11 @@ module ActiveResource {
165
170
166
171
ModelInstanceMethodCall ( ) { this .getReceiver ( ) = i }
167
172
173
+ /** Gets the model instance for this call. */
168
174
ModelInstance getInstance ( ) { result = i }
169
175
170
- ModelClass getModelClass ( ) { result = this .getReceiver ( ) .( ModelInstance ) .getModelClass ( ) }
176
+ /** Gets the model class for this call. */
177
+ ModelClass getModelClass ( ) { result = i .getModelClass ( ) }
171
178
}
172
179
173
180
/**
@@ -185,6 +192,7 @@ module ActiveResource {
185
192
)
186
193
}
187
194
195
+ /** Gets the model class for this collection. */
188
196
ModelClass getModelClass ( ) { result = classMethodCall .getModelClass ( ) }
189
197
}
190
198
@@ -194,6 +202,7 @@ module ActiveResource {
194
202
class CollectionCall extends DataFlow:: CallNode {
195
203
CollectionCall ( ) { this .getReceiver ( ) instanceof Collection }
196
204
205
+ /** Gets the collection for this call. */
197
206
Collection getCollection ( ) { result = this .getReceiver ( ) }
198
207
}
199
208
0 commit comments