leftSideTypes)) { return []; } $allProperties = []; foreach ($analysis->leftSideTypes as $type) { $properties = $this->getStaticPropertiesFromClass($type); $allProperties = \array_merge($allProperties, $properties); } return \array_values(\array_unique($allProperties)); } /** * Get static properties from a class using reflection. * * @return string[] */ private function getStaticPropertiesFromClass(string $className): array { try { $reflection = new \ReflectionClass($className); $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); $staticProperties = \array_filter($properties, fn ($p) => $p->isStatic()); return \array_values(\array_map(fn ($p) => $p->getName(), $staticProperties)); } catch (\ReflectionException $e) { return []; } } }