Where possible you should give a qualified trait name, that is prefixed
with the package identifier.
$builder->buildTrait('php::depend::Parser');
To determine the correct trait, this method implements the following
algorithm.
- Check for an exactly matching instance and reuse it.
- Check for a class instance that belongs to the default package. If
such an instance exists, reuse it and replace the default package with
the newly given package information.
- Check that the requested trait is in the default package, if this
is true, reuse the first trait instance and ignore the default package.
- Create a new instance for the specified package.