<commit_before><?php

    $conn = new PDO('mysql:host=localhost; dbname=seowrapper', 'root', ''); //don't mind me, i'm just an example


    /**
    *  require the main class and your personal config file
    */

    require_once('src/seoWrapper.php');
    require_once('src/MyConfig.php');


    /**
     * Injecting costume and default page declarations and properties
     */
    $SeoWrapper = new SeoWrapper($customPages, $defaultSettings);

    /**
     * We will take one server variable, and check the out settings for the current page
     */
    $currentPage = $SeoWrapper->isPageStaticOrDynamic($_SERVER['REQUEST_URI']);


    /**
     * If current page is static, we will take in configuration from the imported file
     * If page is dynamic we will check db, for table called  'pages' and page 'id'
     * matching the current page id. If data is not found, then we'll throw 404
     */

    if($currentPage === 'dynamic'){
        $fetch = $SeoWrapper->getDynamicContents($conn, 'pages', "id");
        ($SeoWrapper->hasErrors()) ? die('Page is 404ed') : list($title, $keywords, $description) = $fetch;
    }else{
        list($title, $keywords, $description) = $currentPage;
    }




?>




<commit_msg>little twicks<commit_after><?php

    $conn = new PDO('mysql:host=localhost; dbname=seowrapper', 'root', ''); //don't mind me, i'm just an example


    /**
    *  require the main class and your personal config file
    */

    require_once('src/seoWrapper.php');
    require_once('src/MyConfig.php');


    /**
     * Injecting costume and default page declarations and properties
     */
    $SeoWrapper = new SeoWrapper($customPages, $defaultSettings);

    /**
     * We will take one server variable, and check the out settings for the current page
     */
    $currentPage = $SeoWrapper->isPageStaticOrDynamic($_SERVER['REQUEST_URI']);

    var_dump($currentPage);

    /**
     * If current page is static, we will take in configuration from the imported file
     * If page is dynamic we will check db, for table called  'pages' and page 'id'
     * matching the current page id. If data is not found, then we'll throw 404
     */

    if($currentPage === 'dynamic'){
        $fetch = $SeoWrapper->getDynamicContents($conn, 'pages', "id");
        ($SeoWrapper->hasErrors()) ? die('page not found') : list($title, $keywords, $description) = $fetch;
    }else{
        list($title, $keywords, $description) = $currentPage;
    }




?>





{'fraction_non_alphanumeric': 0.13133360356708554, 'fraction_numerical': 0.0036481556546412645, 'mean_word_length': 3.0793388429752064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '1237086', 'n_tokens_mistral': 751, 'n_tokens_neox': 697, 'n_words': 232}