#!/usr/bin/env php
<?php

declare(strict_types=1);

/**
 * Spam checker CLI bridge for non-PHP applications.
 *
 * See src/Cli/CheckCommand.php for the payload format and exit codes.
 */

// Errors must go to STDERR: STDOUT is reserved for the JSON verdict.
ini_set('display_errors', 'stderr');
ini_set('log_errors', '0');
error_reporting(E_ALL);

require dirname(__DIR__) . '/autoload.php';

$command = new FormSpamChecker\Cli\CheckCommand();

exit($command->run($argv));
