<commit_before><?php

class Database
{
    private $host = "127.0.0.1";
    private $dbName = "linkify";
    private $username = "root";
    private $password = "<PASSWORD>";
    private $socetType = "mysql";

    private $instance = NULL;

    function __construct()
    {
        if ($this->instance == NULL) {
            try {
                $db = new PDO (''.$this->socetType .':host='. $this->host .';dbname='. $this->dbName .'', $this->username, $this->password );

                $this->instance = $db;
            } catch (Exception $e) {
                die($e->getMessage());            }
        }
    }

    public function query($sql)
    {
        $query = $this->instance->prepare($sql);
        $query->execute();
        $result = $query->fetchAll();
        return $result;
    }

    public function getObjects($sql, $class)<commit_msg>added port<commit_after><?php

class Database
{
    private $host = "localhost";
    private $dbName = "linkify";
    private $port = 3306;
    private $username = "root";
    private $password = "<PASSWORD>";
    private $socetType = "mysql";

    private $instance = NULL;

    function __construct()
    {
        if ($this->instance == NULL) {
            try {
                $db = new PDO (''.$this->socetType .':host='. $this->host . ';port='. $this->port .';dbname='. $this->dbName .';', $this->username, $this->password );
                //$db = new PDO("mysql:host=localhost;port=3306;dbname=contacts;charset=utf8", "root", "root");
                $this->instance = $db;
            } catch (Exception $e) {
                die($e->getMessage());            }
        }
    }

    public function query($sql)
    {
        $query = $this->instance->prepare($sql);
        $query->execute();
        $result = $query->fetchAll();
        return $result;
    }

    public function getObjects($sql, $class)
{'fraction_non_alphanumeric': 0.1776, 'fraction_numerical': 0.008, 'mean_word_length': 2.0454545454545454, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '6232790', 'n_tokens_mistral': 579, 'n_tokens_neox': 559, 'n_words': 124}