4.0 KiB
4.0 KiB
Code symbols
Helder knows the PHP classes, interfaces, traits and enums your project declares. Cmd+click a class name in the file view to see where it is declared and every place that uses it, in a popup in the middle of the window.
Guide index · Related: File view, Search, Explorer
At a glance
+----------------------------------------------------------------+
| (1) App\Models\User (2) 14 references |
+----------------------------------------------------------------+
| (3) DEFINED IN |
| >[php] app/Models/User.php (4)[class] 12 |
| (5) EXTENDS [Authenticatable] |
| IMPLEMENTS [MustVerifyEmail] |
| USES [HasFactory] [Notifiable] |
| (6) USED IN |
| [php] app/Http/Controllers/UserController.php 3 |
| (7) 18 public function show(User $user) |
| 42 $user = User::findOrFail($id); |
| [php] app/Policies/UserPolicy.php 2 |
| 11 public function view(User $user): bool |
+----------------------------------------------------------------+
- Name: the class name. With exactly one declaration, the full name with its namespace.
- Reference count: how many lines use the name.
- Defined in: each declaration, with badge, path and line number.
- Kind:
class,interface,traitorenum. - Relations: what the declaration extends, implements and uses (traits). Each name is a chip.
- Used in: the files that use the name, each with its number of hits.
- Hit: the line number and the line itself.
Features
Find a clickable class name
- Hold
Cmdwhile the keyboard is in the code. Every class name the project declares gets a thin amber underline. - Move the pointer over an underlined name: the pointer turns into a hand.
- Names from
vendor/count too, so framework classes are clickable. - The underline shows in PHP files, including Blade templates.
Open the symbol popup
Cmd+click an underlined class name.- The popup opens at once and shows "Searching..." until the results are in.
- The popup sits in the middle of the window over a dimmed background.
Defined in
- Lists every declaration of the name, project files before
vendor/files, up to 25. - "No declaration in this project" means the name has no declaration Helder can find.
- Under a declaration, the EXTENDS, IMPLEMENTS and USES rows show related names.
- A related name the project declares lights amber when you hover it. Click it to load the popup for that name. Other names are grey and do nothing.
Used in
- Lists every line that uses the name, grouped by file.
vendor/is left out. - Import lines (
use App\Models\User;) and the declaration line itself are left out. - Up to 300 files are listed.
- Click a hit to open that file at that line. Click a file header to open the file at its first hit.
- The line you land on moves to the middle of the pane and flashes amber.
Move with the keyboard
UpandDownmove the highlight through the declarations first, then every hit.Enteropens the highlighted row.Esc, or a click outside the popup, closes it.
Keeping up to date
- When files change on disk, Helder rebuilds its list of class names. New classes become clickable without a restart.
Keyboard
| Keys | Action |
|---|---|
Cmd (hold) |
Underline the clickable class names |
Cmd+click |
Open the symbol popup for a class name |
Up / Down |
Move through declarations and hits |
Enter |
Open the highlighted declaration or hit |
Esc |
Close the popup |