<commit_before><?php
namespace Ds;

use UnderflowException;

/**
 * PriorityNode
 *
 * @package Ds
 */
final class PriorityNode
{
    /**
     * @var mixed
     */
    public $value;

    /**
     * @var int
     */
    public $priority;

    /**
     * @var int
     */
    public $stamp;

    /**
     * @param mixed $value
     * @param int   $priority
     * @param int   $stamp
     */
    public function __construct($value, int $priority, int $stamp)
    {
        $this->value    = $value;
        $this->priority = $priority;
        $this->stamp    = $stamp;
    }
}

/**
 * PriorityQueue
 *
 * @package Ds
 */
final class PriorityQueue implements \IteratorAggregate, Collection
{
    use Traits\Collection;
    use Traits\SquaredCapacity;

    /**
     * @var int
     */
    const MIN_CAPACITY = 8;

    /**
     * @var array
     */
    private $heap;

    /**
     * @var int
     */
    private $stamp;

    /**
     * Initializes a new priority queue.
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * @inheritDoc
     */
    public function clear()
    {
        $this->reset();
    }
    
    /**
     * Reset the PriorityQueue to an initialised state.
     */
    private reset()
    {
        $this->heap     = [];
        $this->stamp    = 0;
        $this->capacity = self::MIN_CAPACITY;
    }

    /**
     * @inheritDoc
     */
    public function copy()<commit_msg>Missed the function declaration :/<commit_after><?php
namespace Ds;

use UnderflowException;

/**
 * PriorityNode
 *
 * @package Ds
 */
final class PriorityNode
{
    /**
     * @var mixed
     */
    public $value;

    /**
     * @var int
     */
    public $priority;

    /**
     * @var int
     */
    public $stamp;

    /**
     * @param mixed $value
     * @param int   $priority
     * @param int   $stamp
     */
    public function __construct($value, int $priority, int $stamp)
    {
        $this->value    = $value;
        $this->priority = $priority;
        $this->stamp    = $stamp;
    }
}

/**
 * PriorityQueue
 *
 * @package Ds
 */
final class PriorityQueue implements \IteratorAggregate, Collection
{
    use Traits\Collection;
    use Traits\SquaredCapacity;

    /**
     * @var int
     */
    const MIN_CAPACITY = 8;

    /**
     * @var array
     */
    private $heap;

    /**
     * @var int
     */
    private $stamp;

    /**
     * Initializes a new priority queue.
     */
    public function __construct()
    {
        $this->reset();
    }

    /**
     * @inheritDoc
     */
    public function clear()
    {
        $this->reset();
    }
    
    /**
     * Reset the PriorityQueue to an initialised state.
     */
    private function reset()
    {
        $this->heap     = [];
        $this->stamp    = 0;
        $this->capacity = self::MIN_CAPACITY;
    }

    /**
     * @inheritDoc
     */
    public function copy()
{'fraction_non_alphanumeric': 0.14009661835748793, 'fraction_numerical': 0.0013802622498274672, 'mean_word_length': 1.5768888888888888, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '7286571', 'n_tokens_mistral': 950, 'n_tokens_neox': 919, 'n_words': 210}