@@ -44,7 +44,7 @@ pub(crate) fn analyze(
44
44
analysis_data : & mut FunctionAnalysisData ,
45
45
context : & mut BlockContext ,
46
46
) -> Result < ( ) , AnalysisError > {
47
- let codebase = statements_analyzer. get_codebase ( ) ;
47
+ let codebase = statements_analyzer. codebase ;
48
48
let stmt_var = expr. 0 ;
49
49
50
50
// TODO if ($stmt instanceof PropertyProperty) {
@@ -111,8 +111,8 @@ pub(crate) fn analyze(
111
111
IssueKind :: UpcastAwaitable ,
112
112
format ! (
113
113
"{} contains Awaitable but was passed into a more general type {}" ,
114
- assignment_type. get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
115
- class_property_type. get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
114
+ assignment_type. get_id( Some ( statements_analyzer. interner ) ) ,
115
+ class_property_type. get_id( Some ( statements_analyzer. interner ) ) ,
116
116
) ,
117
117
statements_analyzer. get_hpos ( & stmt_var. 1 ) ,
118
118
& context. function_context . calling_functionlike_id ,
@@ -134,8 +134,8 @@ pub(crate) fn analyze(
134
134
"{} expects {}, parent type {} provided" ,
135
135
var_id. clone( ) . unwrap_or( "var" . to_string( ) ) ,
136
136
class_property_type
137
- . get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
138
- assignment_type. get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
137
+ . get_id( Some ( statements_analyzer. interner ) ) ,
138
+ assignment_type. get_id( Some ( statements_analyzer. interner ) ) ,
139
139
) ,
140
140
statements_analyzer. get_hpos ( & stmt_var. 1 ) ,
141
141
& context. function_context . calling_functionlike_id ,
@@ -151,8 +151,8 @@ pub(crate) fn analyze(
151
151
"{} expects {}, parent type {} provided" ,
152
152
var_id. clone( ) . unwrap_or( "var" . to_string( ) ) ,
153
153
class_property_type
154
- . get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
155
- assignment_type. get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
154
+ . get_id( Some ( statements_analyzer. interner ) ) ,
155
+ assignment_type. get_id( Some ( statements_analyzer. interner ) ) ,
156
156
) ,
157
157
statements_analyzer. get_hpos ( & stmt_var. 1 ) ,
158
158
& context. function_context . calling_functionlike_id ,
@@ -177,7 +177,7 @@ pub(crate) fn analyze(
177
177
// }
178
178
invalid_assignment_value_types. insert (
179
179
& assigned_property. 1 . 1 ,
180
- class_property_type. get_id ( Some ( statements_analyzer. get_interner ( ) ) ) ,
180
+ class_property_type. get_id ( Some ( statements_analyzer. interner ) ) ,
181
181
) ;
182
182
} else {
183
183
// has_valid_assignment_value_type = true;
@@ -192,9 +192,9 @@ pub(crate) fn analyze(
192
192
IssueKind :: InvalidPropertyAssignmentValue ,
193
193
format ! (
194
194
"Property ${} with declared type {}, cannot be assigned type {}" ,
195
- statements_analyzer. get_interner ( ) . lookup( property_id) ,
195
+ statements_analyzer. interner . lookup( property_id) ,
196
196
invalid_class_property_type,
197
- assignment_type. get_id( Some ( statements_analyzer. get_interner ( ) ) ) ,
197
+ assignment_type. get_id( Some ( statements_analyzer. interner ) ) ,
198
198
) ,
199
199
statements_analyzer. get_hpos ( & stmt_var. 1 ) ,
200
200
& context. function_context . calling_functionlike_id ,
@@ -222,7 +222,7 @@ pub(crate) fn analyze_regular_assignment(
222
222
223
223
let mut assigned_properties = Vec :: new ( ) ;
224
224
let mut context_type = None ;
225
- let codebase = statements_analyzer. get_codebase ( ) ;
225
+ let codebase = statements_analyzer. codebase ;
226
226
227
227
let was_inside_general_use = context. inside_general_use ;
228
228
context. inside_general_use = true ;
@@ -247,8 +247,8 @@ pub(crate) fn analyze_regular_assignment(
247
247
context. function_context . calling_class . as_ref ( ) ,
248
248
statements_analyzer. get_file_analyzer ( ) . resolved_names ,
249
249
Some ( (
250
- statements_analyzer. get_codebase ( ) ,
251
- statements_analyzer. get_interner ( ) ,
250
+ statements_analyzer. codebase ,
251
+ statements_analyzer. interner ,
252
252
) ) ,
253
253
) ;
254
254
@@ -369,7 +369,7 @@ pub(crate) fn analyze_atomic_assignment(
369
369
context : & mut BlockContext ,
370
370
is_lhs_reference_free : bool ,
371
371
) -> Option < ( TUnion , ( StrId , StrId ) , TUnion ) > {
372
- let codebase = statements_analyzer. get_codebase ( ) ;
372
+ let codebase = statements_analyzer. codebase ;
373
373
let fq_class_name = match lhs_type_part {
374
374
TAtomic :: TNamedObject { name, .. } => * name,
375
375
TAtomic :: TReference { name, .. } => {
@@ -378,7 +378,7 @@ pub(crate) fn analyze_atomic_assignment(
378
378
IssueKind :: NonExistentClass ,
379
379
format ! (
380
380
"Undefined class {}" ,
381
- statements_analyzer. get_interner ( ) . lookup( name)
381
+ statements_analyzer. interner . lookup( name)
382
382
) ,
383
383
statements_analyzer. get_hpos ( expr. 1 . pos ( ) ) ,
384
384
& context. function_context . calling_functionlike_id ,
@@ -399,15 +399,15 @@ pub(crate) fn analyze_atomic_assignment(
399
399
} ;
400
400
401
401
let prop_name = if let aast:: Expr_ :: Id ( id) = & expr. 1 . 2 {
402
- if let Some ( prop_name) = statements_analyzer. get_interner ( ) . get ( & id. 1 ) {
402
+ if let Some ( prop_name) = statements_analyzer. interner . get ( & id. 1 ) {
403
403
prop_name
404
404
} else {
405
405
analysis_data. maybe_add_issue (
406
406
Issue :: new (
407
407
IssueKind :: NonExistentProperty ,
408
408
format ! (
409
409
"Undefined property {}::${}" ,
410
- statements_analyzer. get_interner ( ) . lookup( & fq_class_name) ,
410
+ statements_analyzer. interner . lookup( & fq_class_name) ,
411
411
& id. 1
412
412
) ,
413
413
statements_analyzer. get_hpos ( expr. 1 . pos ( ) ) ,
@@ -439,8 +439,8 @@ pub(crate) fn analyze_atomic_assignment(
439
439
None ,
440
440
statements_analyzer. get_file_analyzer ( ) . resolved_names ,
441
441
Some ( (
442
- statements_analyzer. get_codebase ( ) ,
443
- statements_analyzer. get_interner ( ) ,
442
+ statements_analyzer. codebase ,
443
+ statements_analyzer. interner ,
444
444
) ) ,
445
445
) ;
446
446
@@ -505,8 +505,8 @@ pub(crate) fn analyze_atomic_assignment(
505
505
IssueKind :: ImmutablePropertyWrite ,
506
506
format ! (
507
507
"Property {}::${} is defined on an immutable class" ,
508
- statements_analyzer. get_interner ( ) . lookup( & property_id. 0 ) ,
509
- statements_analyzer. get_interner ( ) . lookup( & property_id. 1 ) ,
508
+ statements_analyzer. interner . lookup( & property_id. 0 ) ,
509
+ statements_analyzer. interner . lookup( & property_id. 1 ) ,
510
510
) ,
511
511
statements_analyzer. get_hpos ( expr. 1 . pos ( ) ) ,
512
512
& context. function_context . calling_functionlike_id ,
@@ -543,7 +543,7 @@ pub(crate) fn analyze_atomic_assignment(
543
543
if !class_property_type. is_mixed ( ) {
544
544
type_expander:: expand_union (
545
545
codebase,
546
- & Some ( statements_analyzer. get_interner ( ) ) ,
546
+ & Some ( statements_analyzer. interner ) ,
547
547
& mut class_property_type,
548
548
& TypeExpansionOptions {
549
549
self_class : Some ( & declaring_classlike_storage. name ) ,
@@ -576,8 +576,8 @@ pub(crate) fn analyze_atomic_assignment(
576
576
IssueKind :: NonExistentProperty ,
577
577
format ! (
578
578
"Undefined property {}::${}" ,
579
- statements_analyzer. get_interner ( ) . lookup( & property_id. 0 ) ,
580
- statements_analyzer. get_interner ( ) . lookup( & property_id. 1 ) ,
579
+ statements_analyzer. interner . lookup( & property_id. 0 ) ,
580
+ statements_analyzer. interner . lookup( & property_id. 1 ) ,
581
581
) ,
582
582
statements_analyzer. get_hpos ( expr. 1 . pos ( ) ) ,
583
583
& context. function_context . calling_functionlike_id ,
@@ -602,7 +602,7 @@ fn add_instance_property_dataflow(
602
602
fq_class_name : & StrId ,
603
603
property_id : & ( StrId , StrId ) ,
604
604
) {
605
- let codebase = statements_analyzer. get_codebase ( ) ;
605
+ let codebase = statements_analyzer. codebase ;
606
606
607
607
if let Some ( classlike_storage) = codebase. classlike_infos . get ( fq_class_name) {
608
608
if classlike_storage. specialize_instance {
0 commit comments