Overview Q & A Rating & Review
NOTABLE CHANGES IN LATEST RELEASE
Keybinding to add private properties. Default is
Class Helper supports:
What does Class Helper do?
Add a class if the cursor is out of the scope of another class.
Add a constructor if the cursor is in scope of a class and there is no constructor.
Add properties if the cursor is in scope of a class and if the class has a constructor. Multiline constructor is also supported.
Add methods. Public methods are always placed before the first private method.
Add getters and setters.
Getters and setters are placed after a constructor if the constructor exist, if not, they are placed after the last propery.
If the class has a missing getter or setter for a property, then the missing getter or setter will be added.
If the class has a getter and a setter for a property, nothing will be added.
How do you do all of that?
The keybinding to add a class, constructor and properties is
The keybinding to add a private properties is
The keybinding to add a method is
The keybinding to add a private method is
The keybinding to add a getter and setter is
alt+m, and the cursor (not the mouse) must be above the property.
You are free to change the keybindings however you like.
PHP specific settings:
// Php: default property visibility
TypeScript specific settings:
// TypeScript: prefix method and properties with public or private keywords
// TypeScript: default property visibility
// TypeScript: prefix method with the type declaration
This extension is inspired by sublime
php companion package.
Hope you like it :)