Skip to content

Commit 0f58576

Browse files
author
andreaspenz
authored
Fix #7893
Fix bug where ClassGenerator generates class with empty namespace fixes
1 parent 813fad8 commit 0f58576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/Magento/Framework/Code/Generator/ClassGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ protected function createMethodGenerator()
206206
}
207207

208208
/**
209-
* {@inheritdoc}
209+
* @return string|null
210210
*/
211211
public function getNamespaceName()
212212
{
213-
return ltrim(parent::getNamespaceName(), '\\');
213+
return ltrim(parent::getNamespaceName(), '\\') ?: null;
214214
}
215215
}

0 commit comments

Comments
 (0)