<commit_before><?php namespace EngineWorks\DBAL\Traits;

use EngineWorks\DBAL\CommonTypes;

trait MethodSqlLimit
{
    public function sqlLimit($query, $requestedPage, $recordsPerPage = 20)
    {
        $requestedPage = max(1, (int) $requestedPage) - 1; // zero indexed
        $recordsPerPage = max(1, (int) $recordsPerPage);
        $query = rtrim($query, "; \t\n\r\0\x0B")
            . ' LIMIT ' . $this->sqlQuote($recordsPerPage, CommonTypes::TINT)
            . ' OFFSET ' . $this->sqlQuote($recordsPerPage * $requestedPage, CommonTypes::TINT) ;
        return $query;
    }
}<commit_msg>Append trail ";"<commit_after><?php namespace EngineWorks\DBAL\Traits;

use EngineWorks\DBAL\CommonTypes;

trait MethodSqlLimit
{
    public function sqlLimit($query, $requestedPage, $recordsPerPage = 20)
    {
        $requestedPage = max(1, (int) $requestedPage) - 1; // zero indexed
        $recordsPerPage = max(1, (int) $recordsPerPage);
        $query = rtrim($query, "; \t\n\r\0\x0B")
            . ' LIMIT ' . $this->sqlQuote($recordsPerPage, CommonTypes::TINT)
            . ' OFFSET ' . $this->sqlQuote($recordsPerPage * $requestedPage, CommonTypes::TINT)
            . ';';
        return $query;
    }
}
{'fraction_non_alphanumeric': 0.15289256198347106, 'fraction_numerical': 0.011570247933884297, 'mean_word_length': 2.9704918032786884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6882790', 'n_tokens_mistral': 415, 'n_tokens_neox': 403, 'n_words': 74}