Resolve a subject expression to a `ClassInfo` using the full resolver pipeline ([`resolve_subject_outcome`]). This handles both simple `$variable` subjects and complex expressions like `$payment->getOrder()` or `$this->faker`. The resolver uses the diagnostic scope cache (when active) for variable lookups, avoiding backward-scanner fallthroughs.
(
subject_text: &str,
is_static: bool,
rctx: &ResolutionCtx<'_>,
)
| 404 | /// the diagnostic scope cache (when active) for variable lookups, |
| 405 | /// avoiding backward-scanner fallthroughs. |
| 406 | fn resolve_variable_subject( |
| 407 | subject_text: &str, |
| 408 | is_static: bool, |
| 409 | rctx: &ResolutionCtx<'_>, |
| 410 | ) -> Option<ClassInfo> { |
| 411 | let access_kind = if is_static { |
| 412 | AccessKind::DoubleColon |
| 413 | } else { |
| 414 | AccessKind::Arrow |
| 415 | }; |
| 416 | |
| 417 | match resolve_subject_outcome(subject_text.trim(), access_kind, rctx) { |
| 418 | SubjectOutcome::Resolved(classes) => { |
| 419 | classes.into_iter().next().map(|arc| ClassInfo::clone(&arc)) |
| 420 | } |
| 421 | _ => None, |
| 422 | } |
| 423 | } |
no test coverage detected