20 namespace Doctrine\Instantiator\Exception;
22 use InvalidArgumentException as BaseInvalidArgumentException;
39 if (interface_exists($className)) {
40 return new self(sprintf(
'The provided type "%s" is an interface, and can not be instantiated', $className));
43 if (PHP_VERSION_ID >= 50400 && trait_exists($className)) {
44 return new self(sprintf(
'The provided type "%s" is a trait, and can not be instantiated', $className));
47 return new self(sprintf(
'The provided class "%s" does not exist', $className));
57 return new self(sprintf(
58 'The provided class "%s" is abstract, and can not be instantiated',
59 $reflectionClass->getName()