Instead they use the filename of the class in which the trait is being used. For example:
src/Some/Directory/ExampleTrait.php:
namespace Some\Directory;
use My/Data/Type;
trait ExampleTrait
{
/**
* @param Type $type
*/
public function testMethod(Type $type)
{
return null;
}
}
src/Other/Directory/ExampleClass.php:
namespace Other\Directory;
class ExampleClass
{
use ExampleTrait;
}
Using a ReflectionCompositeFactory on ExampleClass raises an Exception because \My\Data\Type is incompatible with \Other\Directory\Type.