You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects of the same type will have access to each others private and protected members even though they are not the same instances. This is because the implementation specific details are already known when inside those objects.
$ phpmd --version
PHPMD 1.5.0 by Manuel Pichler
The text was updated successfully, but these errors were encountered:
Observe the following test case:
The member
$bar
is not unused as it is used in thefoo::create()
method. I think the confusion is due to the fact that it is called on an object other than$this
. This is legal PHP as stated in the documentation: http://php.net/manual/en/language.oop5.visibility.php#language.oop5.visibility-other-objectsThe text was updated successfully, but these errors were encountered: