Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`.
(s: string)
| 5140 | |
| 5141 | /** Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`. */ |
| 5142 | function phpSimpleName(s: string): string { |
| 5143 | return s.replace(/^\\/, '').split('\\').pop()!.split('::').pop()!.trim(); |
| 5144 | } |
| 5145 | |
| 5146 | /** The first-parameter class type(s) of a `handle(...)` declaration — union-split, short-named, |
| 5147 | * primitives dropped. `handle(A|B $e)` → [A, B]; `handle(string $x)` / `handle()` → []. */ |
no outgoing calls
no test coverage detected