trait_uses_recursive

The trait_uses_recursive function returns all traits used by a trait:
<?php $traits = trait_uses_recursive(\Illuminate\Notifications\Notifiable::class);
<?php         $results = [];



        foreach (array_reverse(class_parents($class) ?: []) + [$class => $class] as $class) {

            $results += trait_uses_recursive($class);

        }



        return array_unique($results);
<?php         $traits = class_uses($trait) ?: [];



        foreach ($traits as $trait) {

            $traits += trait_uses_recursive($trait);

        }



        return $traits;
<?php             'Illuminate\Tests\Support\SupportTestTraitTwo' => 'Illuminate\Tests\Support\SupportTestTraitTwo',

            'Illuminate\Tests\Support\SupportTestTraitOne' => 'Illuminate\Tests\Support\SupportTestTraitOne',

        ],

            trait_uses_recursive(SupportTestClassOne::class));



        $this->assertSame([], trait_uses_recursive(SupportTestClassTwo::class));

    }
<?php         ],

            trait_uses_recursive(SupportTestClassOne::class));



        $this->assertSame([], trait_uses_recursive(SupportTestClassTwo::class));

    }



    public function testStr()