yii2-relation-trait
yii2-relation-trait copied to clipboard
check softdelete and softrestore via hasProperty method
The usage of isset() raises a warning while using hasProperty() does not. Hope il helps.
This doesn't behave as expected. It's not evaluating the same way as isset does. Haven't had a chance to check it out further, other than the differences described in it's phpdoc. I first thought it was because _rt_softdelete and restore are declared private, but can't be that. Here's the docs
/**
* Returns a value indicating whether a property is defined for this component.
*
* A property is defined if:
*
* - the class has a getter or setter method associated with the specified name
* (in this case, property name is case-insensitive);
* - the class has a member variable with the specified name (when $checkVars is true);
* - an attached behavior has a property of the given name (when $checkBehaviors is true).
I just implemented this pull request and it stopped evaluating as true