<commit_before>#include <initializer_list>
#include <sstream>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "phpcxx/module.h"
#include "phpcxx/function.h"
#include "phpcxx/fcall.h"
#include "phpcxx/types.h"
#include "phpcxx/vector.h"
#include "testsapi.h"
#include "globals.h"

extern "C" {
#include <Zend/zend.h>
#include <Zend/zend_exceptions.h>
}

namespace {

class MyModule : public phpcxx::Module {
public:
    using phpcxx::Module::Module;

protected:
    virtual std::vector<phpcxx::Function> functions() override
    {
        return {
            phpcxx::createFunction<&MyModule::test_parameters>(
                "test_parameters",
                9,
                {
                    phpcxx::byValue("a", phpcxx::ArgumentType::Any),
                    phpcxx::byValue("b", phpcxx::ArgumentType::Bool),
                    phpcxx::byValue("c", phpcxx::ArgumentType::Integer),
                    phpcxx::byValue("d", phpcxx::ArgumentType::Double),
                    phpcxx::byValue("e", phpcxx::ArgumentType::String),
                    phpcxx::byValue("f", phpcxx::ArgumentType::Array),
                    phpcxx::byValue("g", phpcxx::ArgumentType::Object),
                    phpcxx::byValue("h", phpcxx::ArgumentType::Resource),
                    phpcxx::byValue("i", phpcxx::ArgumentType::Callable)
                }
            )
        };
    }

private:
    static void test_parameters(phpcxx::Parameters& p)
    {
        if (!p.verify()) {
            return;
        }
<commit_msg>Bug fix for PHP 7.1: explicitly mark parameters as non-null<commit_after>#include <initializer_list>
#include <sstream>
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "phpcxx/module.h"
#include "phpcxx/function.h"
#include "phpcxx/fcall.h"
#include "phpcxx/types.h"
#include "phpcxx/vector.h"
#include "testsapi.h"
#include "globals.h"

extern "C" {
#include <Zend/zend.h>
#include <Zend/zend_exceptions.h>
}

namespace {

class MyModule : public phpcxx::Module {
public:
    using phpcxx::Module::Module;

protected:
    virtual std::vector<phpcxx::Function> functions() override
    {
        return {
            phpcxx::createFunction<&MyModule::test_parameters>(
                "test_parameters",
                9,
                {
                    phpcxx::byValue("a", phpcxx::ArgumentType::Any, false),
                    phpcxx::byValue("b", phpcxx::ArgumentType::Bool, false),
                    phpcxx::byValue("c", phpcxx::ArgumentType::Integer, false),
                    phpcxx::byValue("d", phpcxx::ArgumentType::Double, false),
                    phpcxx::byValue("e", phpcxx::ArgumentType::String, false),
                    phpcxx::byValue("f", phpcxx::ArgumentType::Array, false),
                    phpcxx::byValue("g", phpcxx::ArgumentType::Object, false),
                    phpcxx::byValue("h", phpcxx::ArgumentType::Resource, false),
                    phpcxx::byValue("i", phpcxx::ArgumentType::Callable, false)
                }
            )
        };
    }

private:
    static void test_parameters(phpcxx::Parameters& p)
    {
        if (!p.verify()) {
            return;
        }

{'fraction_non_alphanumeric': 0.1480087801818752, 'fraction_numerical': 0.0012543116964565694, 'mean_word_length': 2.4787350054525628, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6579469', 'n_tokens_mistral': 1029, 'n_tokens_neox': 1000, 'n_words': 164}