Plain-text version of `enrichment_snippet` (no tab stops). Also used by tag completion (`build_phpdoc_completions`) to enrich `@param`, `@return`, and `@var` type hints with template parameters. Callable types are wrapped in parentheses for PHPDoc notation: `(Closure(): mixed)`, `(callable(): mixed)`.
(
type_hint: Option<&PhpType>,
class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>,
)
| 1193 | /// Callable types are wrapped in parentheses for PHPDoc notation: |
| 1194 | /// `(Closure(): mixed)`, `(callable(): mixed)`. |
| 1195 | pub(crate) fn enrichment_plain( |
| 1196 | type_hint: Option<&PhpType>, |
| 1197 | class_loader: &dyn Fn(&str) -> Option<Arc<ClassInfo>>, |
| 1198 | ) -> Option<String> { |
| 1199 | let typed = enrichment_plain_typed(type_hint, class_loader)?; |
| 1200 | |
| 1201 | // Callable types need parentheses in PHPDoc notation, which |
| 1202 | // PhpType::Display does not add. |
| 1203 | Some(enrichment_type_to_plain(&typed)) |
| 1204 | } |
| 1205 | |
| 1206 | /// Format an enriched `PhpType` as a plain-text PHPDoc type string. |
| 1207 | /// |
no test coverage detected