SmartClassReflector - skip empty class names [closes #309]

This commit is contained in:
TomasVotruba 2018-02-08 16:14:30 +01:00
parent 115c3f355e
commit ba9cb054c7

View File

@ -167,6 +167,10 @@ final class SmartClassReflector
private function isValidClassName(string $className): bool
{
if (empty($className)) {
return false;
}
// invalid class types
if (in_array($className, ['this', 'static', 'self', 'null', 'array', 'string', 'bool'], true)) {
return false;