If a class constructor sets a property of that class, is it recommended to still check if that property is set in other methods? The code:
class A {
public $property;
public function __construct($value) {
$this->property = $value;
}
public function doSomething() {
if(isset($this->property)) {
//actual code here
//...but is this isset-check necessary?
}
else { return false; }
}
}
I'm just used to check if vars are set, just wondering if there are any concerns leaving it out. Thanks!