Return the suffix after the owner name for backed enums (e.g. `": string"`). Returns an empty string for non-enums and unit enums.
(owner: &ClassInfo)
| 279 | /// |
| 280 | /// Returns an empty string for non-enums and unit enums. |
| 281 | pub(super) fn owner_name_suffix(owner: &ClassInfo) -> String { |
| 282 | if let Some(ref bt) = owner.backed_type { |
| 283 | format!(": {}", bt) |
| 284 | } else { |
| 285 | String::new() |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | /// Build a PHP code block wrapping a member inside its owning class, |
| 290 | /// with an optional single-line `/** @var ... */` annotation above it. |
no outgoing calls
no test coverage detected