*/ public static function getFunctionIds() : array { return ['magicfunction']; } public static function doesFunctionExist(FunctionExistenceProviderEvent $event): ?bool { $function_id = $event->getFunctionId(); return $function_id === 'magicfunction'; } /** * @return ?array */ public static function getFunctionParams(FunctionParamsProviderEvent $event): ?array { return [new \Psalm\Storage\FunctionLikeParameter('first', false, Type::getString())]; } public static function getFunctionReturnType(FunctionReturnTypeProviderEvent $event): ?Type\Union { return Type::getString(); } }