Walk through `prefix_keys` to resolve the inner type of a nested array shape. Given a raw type like `array{meta: array{page: int, total: int}}` and prefix keys `["meta"]`, returns `Some(PhpType)` for `array{page: int, total: int}`.
(
&self,
raw_type: &PhpType,
prefix_keys: &[String],
)
| 481 | /// Given a raw type like `array{meta: array{page: int, total: int}}` and |
| 482 | /// prefix keys `["meta"]`, returns `Some(PhpType)` for `array{page: int, total: int}`. |
| 483 | fn resolve_through_prefix_keys( |
| 484 | &self, |
| 485 | raw_type: &PhpType, |
| 486 | prefix_keys: &[String], |
| 487 | ) -> Option<PhpType> { |
| 488 | if prefix_keys.is_empty() { |
| 489 | return Some(raw_type.clone()); |
| 490 | } |
| 491 | |
| 492 | let mut current = raw_type.clone(); |
| 493 | for key in prefix_keys { |
| 494 | current = current.shape_value_type(key)?.clone(); |
| 495 | } |
| 496 | Some(current) |
| 497 | } |
| 498 | |
| 499 | /// Resolve the raw (uncleaned) type annotation for a variable. |
| 500 | /// |
no test coverage detected