MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / phpSimpleName

Function phpSimpleName

src/resolution/callback-synthesizer.ts:5122–5124  ·  view source on GitHub ↗

Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`.

(s: string)

Source from the content-addressed store, hash-verified

5120
5121/** Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`. */
5122function phpSimpleName(s: string): string {
5123 return s.replace(/^\\/, '').split('\\').pop()!.split('::').pop()!.trim();
5124}
5125
5126/** The first-parameter class type(s) of a `handle(...)` declaration — union-split, short-named,
5127 * primitives dropped. `handle(A|B $e)` → [A, B]; `handle(string $x)` / `handle()` → []. */

Callers 2

laravelHandleEventTypesFunction · 0.85
laravelEventEdgesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected