PHP 8.2.30
Preview: GlowRecorder.php Size: 534 B
/proc/thread-self/root/home/byroehnu/easetack.com/vendor/spatie/flare-client-php/src/Glows/GlowRecorder.php

<?php

namespace Spatie\FlareClient\Glows;

class GlowRecorder
{
    const GLOW_LIMIT = 30;

    /** @var array<int, Glow> */
    protected array $glows = [];

    public function record(Glow $glow): void
    {
        $this->glows[] = $glow;

        $this->glows = array_slice($this->glows, static::GLOW_LIMIT * -1, static::GLOW_LIMIT);
    }

    /** @return array<int, Glow> */
    public function glows(): array
    {
        return $this->glows;
    }

    public function reset(): void
    {
        $this->glows = [];
    }
}

Directory Contents

Dirs: 0 × Files: 2

Name Size Perms Modified Actions
1.24 KB lrw-rw-rw- 2025-02-14 13:42:06
Edit Download
534 B lrw-rw-rw- 2025-02-14 13:42:06
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).