Skip to content

Commit b6f2c46

Browse files
committed
Resolve Interceptor generation bugs
- Fix non-variadic parameters being variadic - Ensure it extends the original class
1 parent c12221e commit b6f2c46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bitExpert/PHPStan/Magento/Autoload/InterceptorAutoloader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ protected function getFileContents(string $class): string
9090

9191
$generator = new ClassGenerator();
9292
$generator->setName($class)
93+
->setExtendedClass($originalClassname)
9394
->addProperties([])
9495
->addMethods($methods);
9596

@@ -213,7 +214,7 @@ protected function _getParameterList(array $parameters)
213214
array_map(
214215
function ($item) {
215216
$output = '';
216-
if (!isset($item['variadic'])) {
217+
if (isset($item['variadic']) && $item['variadic']) {
217218
$output .= '... ';
218219
}
219220

0 commit comments

Comments
 (0)