extractInheritance — base_clause takes ONLY the first base (interface multi-extends drops the rest); class_interface_clause takes ALL children unfiltered (full text, incl. leading `\`).
(&mut self, node: Node<'t>, class_row: u32)
| 1330 | /// multi-extends drops the rest); class_interface_clause takes ALL |
| 1331 | /// children unfiltered (full text, incl. leading `\`). |
| 1332 | fn extract_inheritance(&mut self, node: Node<'t>, class_row: u32) { |
| 1333 | let extends_kind = edge_kind_index("extends").unwrap(); |
| 1334 | let implements_kind = edge_kind_index("implements").unwrap(); |
| 1335 | for i in 0..node.named_child_count() { |
| 1336 | let Some(child) = node.named_child(i) else { continue }; |
| 1337 | if child.kind() == "base_clause" { |
| 1338 | if let Some(target) = child.named_child(0) { |
| 1339 | let name = self.text(target).to_string(); |
| 1340 | self.push_ref_at(class_row, &name, extends_kind, target); |
| 1341 | } |
| 1342 | } else if child.kind() == "class_interface_clause" { |
| 1343 | for j in 0..child.named_child_count() { |
| 1344 | let Some(iface) = child.named_child(j) else { continue }; |
| 1345 | let name = self.text(iface).to_string(); |
| 1346 | self.push_ref_at(class_row, &name, implements_kind, iface); |
| 1347 | } |
| 1348 | } |
| 1349 | } |
| 1350 | } |
| 1351 | |
| 1352 | // --- php type refs (extractPhpTypeRefs, 6022) ---------------------------------- |
| 1353 |
no test coverage detected