src/Reflection/ReflectionClass.php
public function getTraitAliases() : array
    {
        /** @var Node\Stmt\TraitUse[] $traitUsages */
        $traitUsages = array_filter($this->node->stmts, static function (Node $node) : bool {
            return $node instanceof TraitUse;
        });

        $resolvedAliases = [];

        foreach ($traitUsages as $traitUsage) {
            $traitNames  = $traitUsage->traits;
            $adaptations = $traitUsage->adaptations;

            foreach ($adaptations as $adaptation) {
                /** @var Node\Name|null $usedTrait */
                $usedTrait = $adaptation->trait;
                if ($usedTrait === null) {
                    $usedTrait = $traitNames[0];
                }

                if (! ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias)) {
                    continue;
                }

                if (! $adaptation->newName) {
                    continue;
                }

                $resolvedAliases[$adaptation->newName->name] = sprintf(
                    '%s::%s',
                    $usedTrait->toString(),
                    $adaptation->method->toString()
                );
            }
        }

        return $resolvedAliases;
    }
public function getTraitAliases() : array
    {
        /** @var Node\Stmt\TraitUse[] $traitUsages */
        $traitUsages = array_filter($this->node->stmts, static function (Node $node) : bool {
            return $node instanceof TraitUse;
        });

        $resolvedAliases = [];

        foreach ($traitUsages as $traitUsage) {
            $traitNames  = $traitUsage->traits;
            $adaptations = $traitUsage->adaptations;

            foreach ($adaptations as $adaptation) {
                /** @var Node\Name|null $usedTrait */
                $usedTrait = $adaptation->trait;
                if ($usedTrait === null) {
                    $usedTrait = $traitNames[0];
                }

                if (! ($adaptation instanceof Node\Stmt\TraitUseAdaptation\Alias)) {
                    continue;
                }

                if (! $adaptation->newName) {
                    continue;
                }

                $resolvedAliases[$adaptation->newName->name] = sprintf(
                    '%s::%s',
                    $usedTrait->toString(),
                    $adaptation->method->toString()
                );
            }
        }

        return $resolvedAliases;
    }
Return a list of the aliases used when importing traits for this class.
The returned array is in key/value pair in this format:.

'aliasedMethodName' => 'ActualClass::actualMethod'

@return string[]

@example
// When reflecting a class such as:
class Foo
{
use MyTrait {
myTraitMethod as myAliasedMethod;
}
}
// This method would return
//   ['myAliasedMethod' => 'MyTrait::myTraitMethod']