getVisibility: any `visibility_modifier` child with one of the three texts; none → public (the php default).
(&self, node: Node)
| 423 | /// getVisibility: any `visibility_modifier` child with one of the three |
| 424 | /// texts; none → public (the php default). |
| 425 | fn visibility_of(&self, node: Node) -> u8 { |
| 426 | for i in 0..node.child_count() { |
| 427 | let Some(child) = node.child(i) else { continue }; |
| 428 | if child.kind() == "visibility_modifier" { |
| 429 | match self.text(child) { |
| 430 | "public" => return 1, |
| 431 | "private" => return 2, |
| 432 | "protected" => return 3, |
| 433 | _ => {} |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | 1 // PHP defaults to public |
| 438 | } |
| 439 | |
| 440 | fn is_static(&self, node: Node) -> bool { |
| 441 | (0..node.child_count()) |
no test coverage detected