Parse PHP source text and extract the declared namespace (if any). Returns the namespace string (e.g. `"Klarna\Rest\Checkout"`) or `None` if the file has no namespace declaration.
(&self, content: &str)
| 1222 | /// Returns the namespace string (e.g. `"Klarna\Rest\Checkout"`) or |
| 1223 | /// `None` if the file has no namespace declaration. |
| 1224 | pub(crate) fn parse_namespace(&self, content: &str) -> Option<String> { |
| 1225 | with_parsed_program(content, "parse_namespace", |program, _content| { |
| 1226 | Self::extract_namespace_from_statements(program.statements.iter()) |
| 1227 | }) |
| 1228 | } |
| 1229 | } |
no test coverage detected