I often do this when making classes and found it to be really bothersome, especially when I have classes with 20 or so properties.
is there a way to shorten this:
class SomeClass {
public $property1, $property2, $property3;
function __construct($property1, $property2, $property3) {
$this->property1 = $property1;
$this->property2 = $property2;
$this->property3 = $property3;
}
}
I really googled everything that hit my mind but haven’t found any results, so it probably isn’t possible?
If it isn’t possible to do it programmatically, is there a way I can make Eclipse PDT automatically write down this code for me on my request?
Put this into your constructor