public function loadTokenBySeries($series): PersistentToken
    {
        $sql = '
            SELECT
                class, username, value, lastUsed
            FROM
                tl_remember_me
            WHERE
                series=:series
        ';

        $values = [
            'series' => hash_hmac('sha256', $series, $this->secret),
        ];

        $types = [
            'series' => \PDO::PARAM_STR,
        ];

        $stmt = $this->connection->executeQuery($sql, $values, $types);

        if (!$row = $stmt->fetch(\PDO::FETCH_OBJ)) {
            throw new TokenNotFoundException('No token found.');
        }

        return new PersistentToken($row->class, $row->username, $series, $row->value, new \DateTime($row->lastUsed));
    }
public function loadTokenBySeries($series): PersistentToken
    {
        $sql = '
            SELECT
                class, username, value, lastUsed
            FROM
                tl_remember_me
            WHERE
                series=:series
        ';

        $values = [
            'series' => hash_hmac('sha256', $series, $this->secret),
        ];

        $types = [
            'series' => \PDO::PARAM_STR,
        ];

        $stmt = $this->connection->executeQuery($sql, $values, $types);

        if (!$row = $stmt->fetch(\PDO::FETCH_OBJ)) {
            throw new TokenNotFoundException('No token found.');
        }

        return new PersistentToken($row->class, $row->username, $series, $row->value, new \DateTime($row->lastUsed));
    }
{@inheritdoc}