Add some missing param declarations in functions
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php // phpcs:ignore PSR1.Files.SideEffects
|
||||||
|
|
||||||
header("Content-Type: application/json; charset=UTF-8");
|
header("Content-Type: application/json; charset=UTF-8");
|
||||||
session_start();
|
session_start();
|
||||||
@@ -8,7 +8,7 @@ define('LOG', 'log' . DS);
|
|||||||
// run id
|
// run id
|
||||||
DEFINE('RUNUID', session_id());
|
DEFINE('RUNUID', session_id());
|
||||||
|
|
||||||
function logWrite($message)
|
function logWrite(string $message): void
|
||||||
{
|
{
|
||||||
global $fh;
|
global $fh;
|
||||||
if (!$fh) {
|
if (!$fh) {
|
||||||
@@ -17,7 +17,7 @@ function logWrite($message)
|
|||||||
fwrite($fh, '{' . RUNUID . '} [' . printTime() . '] ' . $message . "\n");
|
fwrite($fh, '{' . RUNUID . '} [' . printTime() . '] ' . $message . "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
function logHandleClose()
|
function logHandleClose(): void
|
||||||
{
|
{
|
||||||
global $fh;
|
global $fh;
|
||||||
if ($fh) {
|
if ($fh) {
|
||||||
@@ -25,7 +25,7 @@ function logHandleClose()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function printTime()
|
function printTime(): string
|
||||||
{
|
{
|
||||||
$set_microtime = 4;
|
$set_microtime = 4;
|
||||||
list($microtime, $timestamp) = explode(' ', microtime());
|
list($microtime, $timestamp) = explode(' ', microtime());
|
||||||
|
|||||||
Reference in New Issue
Block a user