MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / is_class_keyword

Function is_class_keyword

src/util.rs:1861–1863  ·  view source on GitHub ↗

Returns `true` if `s` is one of the PHP class-keyword references: `self`, `static`, `$this`, or `parent`. Use this when you need a single guard that covers *all* class keywords, including `parent`. For the subset that resolves to the current* class only, use [`is_self_or_static`].

(s: &str)

Source from the content-addressed store, hash-verified

1859/// keywords, including `parent`. For the subset that resolves to the
1860/// *current* class only, use [`is_self_or_static`].
1861pub(crate) fn is_class_keyword(s: &str) -> bool {
1862 is_self_or_static(s) || s.eq_ignore_ascii_case("parent")
1863}
1864
1865/// Resolve `self`, `static`, `$this`, or `parent` to a class name.
1866///

Calls 1

is_self_or_staticFunction · 0.85

Tested by

no test coverage detected