Skip to content

Commit e004d10

Browse files
committed
Fix phpstan
1 parent 0db26be commit e004d10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/StaticPHP/Package/PackageLoader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ public static function loadFromClass(mixed $class): void
221221
self::$packages[$pkg->getName()] = $pkg;
222222
}
223223

224+
if (!isset($instance_class)) {
225+
$instance_class = $refClass->newInstance();
226+
}
227+
224228
// parse non-package available attributes
225229
foreach ($refClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
226230
$method_attributes = $method->getAttributes();

0 commit comments

Comments
 (0)