Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`.
(s: string)
| 5120 | |
| 5121 | /** Short class name from a PHP reference: `\App\Events\Foo` / `App\Events::Foo` → `Foo`. */ |
| 5122 | function 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()` → []. */ |
no outgoing calls
no test coverage detected