/** * @param Property[] $properties * @param Class_|Trait_ $class */ protected function addPropertiesFromUsedTraits(array &$properties, ClassLike $class) { foreach ($class->getTraits() as $traitName) { if ($this->isTrait($traitName)) { foreach ($this->findAllProperties($traitName) as $property) { $this->mergeProperty($properties, clone $property); } } } }