leftSideTypes)) { return []; } $includeMagic = \strpos($analysis->prefix, '__') === 0; $methods = []; foreach ($analysis->leftSideTypes as $type) { try { $reflection = new \ReflectionClass($type); } catch (\ReflectionException $e) { continue; } foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { if ($method->isStatic()) { $methods[] = $method->getName(); } } } $methods = \array_unique($methods); if (!$includeMagic) { $methods = \array_filter($methods, fn ($method) => \strpos($method, '__') !== 0); } return \array_values($methods); } }