Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Checks if the trait exists
trait_exists(string $traitbool $autoload true): bool
        if (isset($a[$prefix.'returnType'])) {

            
$v $a[$prefix.'returnType'];

            
$v $v instanceof \ReflectionNamedType $v->getName() : (string) $v;

            
$a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v '?'.$v $v, [class_exists($vfalse) || interface_exists($vfalse) || trait_exists($vfalse) ? $v '''']);

        }

        if (isset(
$a[$prefix.'class'])) {

            
$a[$prefix.'class'] = new ClassStub($a[$prefix.'class']);
        if (isset($a[$prefix.'typeHint'])) {

            
$v $a[$prefix.'typeHint'];

            
$a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($vfalse) || interface_exists($vfalse) || trait_exists($vfalse) ? $v '''']);

        } else {

            unset(
$a[$prefix.'allowsNull']);

        }