<commit_before><?php

namespace Coyote\Repositories\Redis;

use Coyote\Repositories\Contracts\SessionRepositoryInterface;
use Illuminate\Container\Container as App;

class SessionRepository implements SessionRepositoryInterface
{
    /**
     * @var App
     */
    protected $app;

    /**
     * @var mixed
     */
    protected $redis;

    /**
     * @param App $app
     */
    public function __construct(App $app)
    {
        $this->app = $app;

        $this->makeRedis();
    }

    /**
     * @param string|null $path
     * @return \Illuminate\Support\Collection|static
     */
    public function getByPath($path = null)
    {
        $collection = collect($this->all());

        if ($path === null) {
            return $collection;
        }

        return $collection->filter(function ($item) use ($path) {
            $path = parse_url($item['url'], PHP_URL_PATH);

            return starts_with($path, $path);
        });<commit_msg>bugfix: bledna nazwa zmiennej<commit_after><?php

namespace Coyote\Repositories\Redis;

use Coyote\Repositories\Contracts\SessionRepositoryInterface;
use Illuminate\Container\Container as App;

class SessionRepository implements SessionRepositoryInterface
{
    /**
     * @var App
     */
    protected $app;

    /**
     * @var mixed
     */
    protected $redis;

    /**
     * @param App $app
     */
    public function __construct(App $app)
    {
        $this->app = $app;

        $this->makeRedis();
    }

    /**
     * @param string|null $path
     * @return \Illuminate\Support\Collection|static
     */
    public function getByPath($path = null)
    {
        $collection = collect($this->all());

        if ($path === null) {
            return $collection;
        }

        return $collection->filter(function ($item) use ($path) {
            $urlPath = parse_url($item['url'], PHP_URL_PATH);

            return starts_with($path, $urlPath);
        });
{'fraction_non_alphanumeric': 0.13509316770186336, 'fraction_numerical': 0.0, 'mean_word_length': 2.2432885906040267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5890318', 'n_tokens_mistral': 573, 'n_tokens_neox': 566, 'n_words': 119}