Resolve an attribute's short name through the file's use-map and return the last segment of the resolved FQN. For example, if the file has `use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as Available;` then `resolve_attr_last_segment("Available")` returns `"PhpStormStubsElementAvailable"`. When the name is not in the use-map, returns `None` (the caller should fall back to the orig
(&self, short_name: &str)
| 85 | /// When the name is not in the use-map, returns `None` (the caller |
| 86 | /// should fall back to the original name). |
| 87 | fn resolve_attr_last_segment(&self, short_name: &str) -> Option<&str> { |
| 88 | let fqn = self.use_map.get(short_name)?; |
| 89 | Some(fqn.rsplit('\\').next().unwrap_or(fqn)) |
| 90 | } |
| 91 | |
| 92 | /// Check whether `attr_short_name` resolves to `PhpStormStubsElementAvailable`. |
| 93 | pub(crate) fn is_element_available_attr(&self, attr_short_name: &str) -> bool { |
no test coverage detected