<commit_before><?php

/*
 * This file is part of the SncRedisBundle package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Snc\RedisBundle\Session\Storage\Handler;

use Symfony\Component\HttpFoundation\Session\Storage\AbstractSessionStorage;
use Predis\Client;

/**
 * Redis based session storage
 *
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 */
class RedisSessionHandler implements \SessionHandlerInterface
{
    /**
     * Instance of Client
     *
     * @var Client
     */
    protected $db;

    protected $options;

    /**
     * Redis session storage constructor
     *
     * @param Client $db      Redis database connection
     * @param array  $options Session options
     * @param string $prefix  Prefix to use when writing session data
     */
    public function __construct(Client $db, $options = array(), $prefix = 'session')
    {
        $this->db = $db;<commit_msg>Session handler now extends NativeSessionHandler<commit_after><?php

/*
 * This file is part of the SncRedisBundle package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Snc\RedisBundle\Session\Storage\Handler;

use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler;
use Predis\Client;

/**
 * Redis based session storage
 *
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 * @author  <NAME> <<EMAIL>>
 */
class RedisSessionHandler extends NativeSessionHandler
{
    /**
     * Instance of Client
     *
     * @var Client
     */
    protected $db;

    protected $options;

    /**
     * Redis session storage constructor
     *
     * @param Client $db      Redis database connection
     * @param array  $options Session options
     * @param string $prefix  Prefix to use when writing session data
     */
    public function __construct(Client $db, $options = array(), $prefix = 'session')
    {
        $this->db = $db;
{'fraction_non_alphanumeric': 0.11266294227188083, 'fraction_numerical': 0.0, 'mean_word_length': 3.062381852551985, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '5705994', 'n_tokens_mistral': 614, 'n_tokens_neox': 610, 'n_words': 199}