add getter and setter in intellij code example
Example 1: phpstorm constructor shortcut
alt + insert
Example 2: generate getters and setters intellij
alt + insert // Select appropriately from dropdown menu
alt + insert
alt + insert // Select appropriately from dropdown menu