only own properties set to class

Why? `$prop->getDeclaringClass() == $from` is shorter and than `$prop->getDeclaringClass()->getName() === $from->getName()` with the same effect.