get all traits of ancestor classes & ancestor traits

useful when using setters in traits
You wouldn't call `array_values` until after exiting from the loops, probably as the very last line:

```php
return array_values($traits);
```

Possible you don't even need to call `array_values` at all... the original code didn't.