Fix extension generator when class has no parents
@@ -391,11 +391,13 @@ class ExtensionGenerator
$parentName = $parent ? $parent->getName() : '';
$extends = $parentName ? " extends \\{$parentName}" : '';
$interfaceNames = $class->getInterfaceNames();
+ if ($parent) {
foreach ($interfaceNames as $index => $interfaceName) {
if ($parent->implementsInterface($interfaceName)) {
unset($interfaceNames[$index]);
}
}
+ }
if (count($interfaceNames) > 0) {
$implements = ' implements ' . '\\' . implode(', \\', $interfaceNames);
} else {
