<commit_before><?php

namespace Gielfeldt;

/**
 * Class ShutdownHandler
 */
class ShutdownHandler
{
    /**
     * Registered handler objects.
     * @var array
     */
    protected static $handlers;

    /**
     * Stack counter for registered handler keys.
     * @var array
     */
    protected static $keys = array();

    /**
     * Stack counter for registered handler objects.
     * @var integer
     */
    protected static $counter = 0;

    /**
     * Callback for handler.
     * @var callback
     */
    protected $callback;

    /**
     * Arguments for callback.
     * @var array
     */
    protected $arguments;

    /**
     * The handler object's id in the stack counter.
     * @var string
     */
    protected $id;

    /**
     * The handler object's key.
     * @var string
     */
    protected $key;

    /**
     * ------ PUBLIC METHODS ------
     */

    /**
     * Constructor.
     *
     * Instantiate shutdown handler object.
     *
     * @param callback $callback
     *   Callback to call on shutdown.
     * @param array $arguments
     *   Arguments for the callback.
     */
    public function __construct($callback, array $arguments = array(), $key = null)<commit_msg>Update documentation.<commit_after><?php

namespace Gielfeldt;

/**
 * Class ShutdownHandler
 */
class ShutdownHandler
{
    /**
     * Registered handler objects.
     * @var array
     */
    protected static $handlers;

    /**
     * Stack counter for registered handler keys.
     * @var array
     */
    protected static $keys = array();

    /**
     * Stack counter for registered handler objects.
     * @var integer
     */
    protected static $counter = 0;

    /**
     * Callback for handler.
     * @var callback
     */
    protected $callback;

    /**
     * Arguments for callback.
     * @var array
     */
    protected $arguments;

    /**
     * The handler object's id in the stack counter.
     * @var string
     */
    protected $id;

    /**
     * The handler object's key.
     * @var string
     */
    protected $key;

    /**
     * ------ PUBLIC METHODS ------
     */

    /**
     * Constructor.
     *
     * Instantiate shutdown handler object.
     *
     * @param callback $callback
     *   Callback to call on shutdown.
     * @param array $arguments
     *   Arguments for the callback.
     * @param string $key
     *   (Optional) Key for singleton destructor. If provided, only one
     *   registered handler per key will run.
     */
    public function __construct($callback, array $arguments = array(), $key = null)
{'fraction_non_alphanumeric': 0.11744186046511627, 'fraction_numerical': 0.0007751937984496124, 'mean_word_length': 1.7902702702702702, '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': '3914353', 'n_tokens_mistral': 746, 'n_tokens_neox': 699, 'n_words': 224}