<commit_before><?php

namespace PHPFastCGI\FastCGIDaemon;

/**
 * The DaemonInterface contains the FCGI constants and defines a single blocking
 * method that can be used to operate a kernel.
 */
interface DaemonInterface
{
    // Socket descriptor
    const FCGI_LISTENSOCK_FILENO = 0;

    // Versions
    const FCGI_VERSION_1         = 1;

    // Records
    const FCGI_BEGIN_REQUEST     = 1;
    const FCGI_ABORT_REQUEST     = 2;
    const FCGI_END_REQUEST       = 3;
    const FCGI_PARAMS            = 4;
    const FCGI_STDIN             = 5;
    const FCGI_STDOUT            = 6;
    const FCGI_STDERR            = 7;
    const FCGI_DATA              = 8;
    const FCGI_GET_VALUES        = 9;

    // Roles
    const FCGI_RESPONDER         = 1;
    const FCGI_AUTHORIZER        = 2;
    const FCGI_FILTER            = 3;

    // Flags
    const FCGI_KEEP_CONNECTION   = 1;

    // Statuses
    const FCGI_REQUEST_COMPLETE  = 0;
    const FCGI_CANT_MPX_CONN     = 1;
    const FCGI_OVERLOADED        = 2;
    const FCGI_UNKNOWN_ROLE      = 3;

    /**
     * Run the daemon.
     *
     * @param callable|KernelInterface $handler The request handler
     */
    public function run($handler);
}
<commit_msg>Stripped ConnectionHandlerFactory instantiating logic from Daemon and made it a dependency (changes to DaemonInterface)<commit_after><?php

namespace PHPFastCGI\FastCGIDaemon;

/**
 * The DaemonInterface contains the FCGI constants and defines a single blocking
 * method to run the daemon.
 */
interface DaemonInterface
{
    // Socket descriptor
    const FCGI_LISTENSOCK_FILENO = 0;

    // Versions
    const FCGI_VERSION_1         = 1;

    // Records
    const FCGI_BEGIN_REQUEST     = 1;
    const FCGI_ABORT_REQUEST     = 2;
    const FCGI_END_REQUEST       = 3;
    const FCGI_PARAMS            = 4;
    const FCGI_STDIN             = 5;
    const FCGI_STDOUT            = 6;
    const FCGI_STDERR            = 7;
    const FCGI_DATA              = 8;
    const FCGI_GET_VALUES        = 9;

    // Roles
    const FCGI_RESPONDER         = 1;
    const FCGI_AUTHORIZER        = 2;
    const FCGI_FILTER            = 3;

    // Flags
    const FCGI_KEEP_CONNECTION   = 1;

    // Statuses
    const FCGI_REQUEST_COMPLETE  = 0;
    const FCGI_CANT_MPX_CONN     = 1;
    const FCGI_OVERLOADED        = 2;
    const FCGI_UNKNOWN_ROLE      = 3;

    /**
     * Run the daemon.
     * 
     * This is a blocking method that does not return.
     * 
     * @throws \Exception On fatal error
     */
    public function run();
}

{'fraction_non_alphanumeric': 0.06648308418568057, 'fraction_numerical': 0.015735641227380016, 'mean_word_length': 1.8637387387387387, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4496651', 'n_tokens_mistral': 879, 'n_tokens_neox': 854, 'n_words': 219}