<commit_before><?php

namespace Stack;

use Symfony\Component\HttpKernel\HttpKernelInterface;

class Builder
{
    private $specs;

    public function __construct()
    {
        $this->specs = new \SplStack();
    }

    public function unshift(/*$kernelClass, $args...*/)
    {
        $spec = func_get_args();
        $this->specs->unshift($spec);

        return $this;
    }

    public function push(/*$kernelClass, $args...*/)
    {
        $spec = func_get_args();
        $this->specs->push($spec);

        return $this;
    }

    public function resolve(HttpKernelInterface $app)
    {
        $middlewares = [$app];

        foreach ($this->specs as $spec) {
            $args = $spec;
            $firstArg = array_shift($args);
<commit_msg>remove (hopefully) last 5.4-ism<commit_after><?php

namespace Stack;

use Symfony\Component\HttpKernel\HttpKernelInterface;

class Builder
{
    private $specs;

    public function __construct()
    {
        $this->specs = new \SplStack();
    }

    public function unshift(/*$kernelClass, $args...*/)
    {
        $spec = func_get_args();
        $this->specs->unshift($spec);

        return $this;
    }

    public function push(/*$kernelClass, $args...*/)
    {
        $spec = func_get_args();
        $this->specs->push($spec);

        return $this;
    }

    public function resolve(HttpKernelInterface $app)
    {
        $middlewares = array($app);

        foreach ($this->specs as $spec) {
            $args = $spec;
            $firstArg = array_shift($args);

{'fraction_non_alphanumeric': 0.1485342019543974, 'fraction_numerical': 0.0013029315960912053, 'mean_word_length': 2.213389121338912, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '1319194', 'n_tokens_mistral': 493, 'n_tokens_neox': 475, 'n_words': 97}