Style fixes from phpcs

This commit is contained in:
Keith Solomon
2026-08-03 13:54:30 -05:00
parent 265e1841f0
commit 9fa5247445
+28 -2
View File
@@ -7,8 +7,16 @@
* resulting rows match the expected (id, user, timestamp, description,
* amount) tuples derived from the fixture.
*
* PHP version 8.1+
*
* Run: php tests/process_log_entries_test.php
* Exit code 0 = pass.
*
* @category Test
* @package TornVaultTracker
* @author Keith Solomon <ksolo@gmail.com>
* @license Unlicense https://unlicense.org/
* @link https://github.com/ksolo/Torn-Vault-Tracker
*/
declare(strict_types=1);
@@ -16,20 +24,38 @@ declare(strict_types=1);
// Make USER_KEYS available without including config.php (it would force a
// real DB connection).
if (!defined('USER_KEYS')) {
define('USER_KEYS', [
define(
'USER_KEYS', [
'zarathos' => 'test-key-not-used',
'symos' => 'test-key-not-used',
]);
]
);
}
require_once __DIR__ . '/../includes/exceptions.php';
require_once __DIR__ . '/../includes/utilities.php';
/**
* Print a failure message to STDERR and exit with status 1.
*
* @param string $message Human-readable failure description.
*
* @return never
*/
function fail(string $message): void {
fwrite(STDERR, "FAIL: $message\n");
exit(1);
}
/**
* Lightweight assertion helper that mirrors PHPUnit's assertSame().
*
* @param mixed $expected The expected value.
* @param mixed $actual The actual value.
* @param string $label Human-readable label for failure messages.
*
* @return void
*/
function assertSame($expected, $actual, string $label): void {
if ($expected !== $actual) {
$exp = var_export($expected, true);