*/ public static function getFunctionIds() : array { return ['magicfunction']; } public static function doesFunctionExist( StatementsSource $statements_source, string $function_id, ?CodeLocation $code_location = null ): ?bool { return $function_id === 'magicfunction'; } /** * @param array $call_args * * @return ?array */ public static function getFunctionParams( StatementsSource $statements_source, string $function_id, array $call_args, ?Context $context = null, ?CodeLocation $code_location = null ): ?array { return [new \Psalm\Storage\FunctionLikeParameter('first', false, Type::getString())]; } /** * @param array $call_args * */ public static function getFunctionReturnType( StatementsSource $statements_source, string $function_id, array $call_args, Context $context, CodeLocation $code_location ): ?Type\Union { return Type::getString(); } }