php_testability
php_testability copied to clipboard
Report Law of Demeter violation
These:
$externalObj->subObject->method();
$a = $externalObj->anotherObj->someproperty;
Violate the Law of Demeter.
But this:
$query->select('*')->from('table')->where('1=1');
Does not (methods instead of properties)
Also this:
$this->internalObj->getSomething();
Because it is an internal object.