only own properties set to class

Because `spl_object_hash($prop->getDeclaringClass()) !== $from` - I believe it's the same reason as in the usage [here](https://github.com/uestla/php-generator/blob/4b75aed64857e9992b10c36fd7e6d645f1f78c51/src/PhpGenerator/ClassType.php#L111).

Maybe `$prop->getDeclaringClass()->getName() === $from->getName()` should do it as well...