Add some missing param declarations in functions

This commit is contained in:
2023-06-30 17:44:42 +09:00
parent a644b9b207
commit 960d396aae

View File

@@ -1,4 +1,4 @@
<?php
<?php // phpcs:ignore PSR1.Files.SideEffects
header("Content-Type: application/json; charset=UTF-8");
session_start();
@@ -8,7 +8,7 @@ define('LOG', 'log' . DS);
// run id
DEFINE('RUNUID', session_id());
function logWrite($message)
function logWrite(string $message): void
{
global $fh;
if (!$fh) {
@@ -17,7 +17,7 @@ function logWrite($message)
fwrite($fh, '{' . RUNUID . '} [' . printTime() . '] ' . $message . "\n");
}
function logHandleClose()
function logHandleClose(): void
{
global $fh;
if ($fh) {
@@ -25,7 +25,7 @@ function logHandleClose()
}
}
function printTime()
function printTime(): string
{
$set_microtime = 4;
list($microtime, $timestamp) = explode(' ', microtime());