<commit_before><?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/autoloader.php';

/*
 * Use the identifier passed in the URL
 */
if ( isset($_GET['id']) && strlen($_GET['id']) == 7)
{
    $id = $_GET['id'];
}

$database = new Database;
$db = $database->connect();
<commit_msg>Add a 404 when no business ID is provided<commit_after><?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/autoloader.php';

/*
 * Use the identifier passed in the URL
 */
if ( isset($_GET['id']) && strlen($_GET['id']) == 7)
{
    $id = $_GET['id'];
}
else
{
    header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found", true, 404);
    echo json_encode('Error');
    exit;
}

$database = new Database;
$db = $database->connect();

{'fraction_non_alphanumeric': 0.20445062586926285, 'fraction_numerical': 0.015299026425591099, 'mean_word_length': 4.373134328358209, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2526905', 'n_tokens_mistral': 257, 'n_tokens_neox': 248, 'n_words': 62}