mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-10 05:02:23 +00:00
SmartClassReflector - skip empty class names [closes #309]
This commit is contained in:
parent
115c3f355e
commit
ba9cb054c7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user