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