Beispiel #1
0
        public static bool assert(Context ctx, PhpValue assertion, PhpValue action = default)
        {
            // TODO: check assertion is enabled

            if (assertion.IsString())
            {
                PhpException.InvalidArgumentType(nameof(assertion), PhpVariable.TypeNameBoolean);
                return(true);
            }

            return(ctx.Assert(assertion, action));
        }