<commit_before><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model
 */

namespace PH7;

use PH7\Framework\Mvc\Model\Ads;
use PH7\Framework\Mvc\Model\Engine\Db;

class AdsCoreModel extends Ads
{
    const CACHE_GROUP = 'db/sys/core/ads';
    const CACHE_TIME = 604800;

    /**
     * Get Advertisements in the database.
     *
     * @param int|null $mActive 1 = active otherwise null. Default value is 1.
     * @param string $sTable The table.
     *
     * @return array The advertisements data.
     */
    public function get($mActive = 1, $iOffset, $iLimit, $sTable = AdsCore::AD_TABLE_NAME)
    {
        AdsCore::checkTable($sTable);
        $iOffset = (int)$iOffset;
        $iLimit = (int)$iLimit;

        $sSqlActive = (!empty($mActive)) ? 'WHERE active= :active' : '';
        $rStmt = Db::getInstance()->prepare('SELECT * FROM' . Db::prefix($sTable) . $sSqlActive . ' ORDER BY active ASC, name ASC LIMIT :offset, :limit');
        if (!empty($mActive)) {
            $rStmt->bindValue(':active', $mActive, \PDO::PARAM_INT);
        }
        $rStmt->bindParam(':offset', $iOffset, \PDO::PARAM_INT);
        $rStmt->bindParam(':limit', $iLimit, \PDO::PARAM_INT);
        $rStmt->execute();
        $oRow = $rStmt->fetchAll(\PDO::FETCH_OBJ);
        Db::free($rStmt);
<commit_msg>Remove unnecessary parentheses<commit_after><?php
/**
 * @author         <NAME> <<EMAIL>>
 * @copyright      (c) 2012-2018, <NAME>. All Rights Reserved.
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
 * @package        PH7 / App / System / Core / Model
 */

namespace PH7;

use PH7\Framework\Mvc\Model\Ads;
use PH7\Framework\Mvc\Model\Engine\Db;

class AdsCoreModel extends Ads
{
    const CACHE_GROUP = 'db/sys/core/ads';
    const CACHE_TIME = 604800;

    /**
     * Get Advertisements in the database.
     *
     * @param int|null $mActive 1 = active otherwise null. Default value is 1.
     * @param string $sTable The table.
     *
     * @return array The advertisements data.
     */
    public function get($mActive = 1, $iOffset, $iLimit, $sTable = AdsCore::AD_TABLE_NAME)
    {
        AdsCore::checkTable($sTable);
        $iOffset = (int)$iOffset;
        $iLimit = (int)$iLimit;

        $sSqlActive = !empty($mActive) ? 'WHERE active= :active' : '';
        $rStmt = Db::getInstance()->prepare('SELECT * FROM' . Db::prefix($sTable) . $sSqlActive . ' ORDER BY active ASC, name ASC LIMIT :offset, :limit');
        if (!empty($mActive)) {
            $rStmt->bindValue(':active', $mActive, \PDO::PARAM_INT);
        }
        $rStmt->bindParam(':offset', $iOffset, \PDO::PARAM_INT);
        $rStmt->bindParam(':limit', $iLimit, \PDO::PARAM_INT);
        $rStmt->execute();
        $oRow = $rStmt->fetchAll(\PDO::FETCH_OBJ);
        Db::free($rStmt);

{'fraction_non_alphanumeric': 0.15773907328294445, 'fraction_numerical': 0.01511666118961551, 'mean_word_length': 2.7441574415744157, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, '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': '129171', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1016, 'n_words': 240}