Remove void return type, not avail till PHP 7.1

This commit is contained in:
mattpass
2020-10-26 16:44:35 +00:00
parent 1ccf01bfc0
commit 0b75351b1f
3 changed files with 14 additions and 14 deletions

View File

@@ -171,7 +171,7 @@ class Settings
return $this->setConfigUsersSettings($fileName, $settings);
}
public function updateConfigUsersCreateDate($fileName): void
public function updateConfigUsersCreateDate($fileName)
{
global $ICEcoderUserSettings;
@@ -191,7 +191,7 @@ class Settings
$ICEcoderUserSettings['configCreateDate'] = $filemtime;
}
public function createIPSettingsFileIfNotExist(): void
public function createIPSettingsFileIfNotExist()
{
global $username, $settingsFile, $settingsFileAddr;

View File

@@ -7,7 +7,7 @@ class System
/**
* @param $path
*/
private function createDirIfNotExists($path): void
private function createDirIfNotExists($path)
{
if (false === file_exists($path)) {
mkdir($path);
@@ -26,7 +26,7 @@ class System
}
}
public function setErrorHandling(): void
public function setErrorHandling()
{
// Don't display, but log all errors
ini_set('display_errors', '0');
@@ -41,7 +41,7 @@ class System
* @param $file
* @param $msg
*/
public function writeLog($file, $msg): void
public function writeLog($file, $msg)
{
$this->createDirIfNotExists(dirname(__FILE__) . '/../data/logs');
$this->createDirIfNotExists(dirname(__FILE__) . '/../data/logs/processes');
@@ -50,7 +50,7 @@ class System
fclose($fh);
}
public function setTimeZone(): void
public function setTimeZone()
{
// Set our default timezone and suppress warning with @
@date_default_timezone_set(date_default_timezone_get());
@@ -74,7 +74,7 @@ class System
/**
* @param $path
*/
public function invalidateOPCache($path): void
public function invalidateOPCache($path)
{
if (function_exists('opcache_invalidate')) {
opcache_invalidate($path, true);

View File

@@ -28,7 +28,7 @@ class ExtraProcesses
* @param $action
* @param string $msg
*/
private function writeLog($action, $msg = ""): void
private function writeLog($action, $msg = "")
{
$username = "" !== $this->username ? $this->username : "default-user";
@@ -56,7 +56,7 @@ class ExtraProcesses
/**
*
*/
public function onFileLoad(): void
public function onFileLoad()
{
// PHP example:
// $this->writeLog("FILE LOAD");
@@ -225,7 +225,7 @@ class ExtraProcesses
/**
* @param string $username
*/
public function onUserNew($username = ""): void
public function onUserNew($username = "")
{
// PHP example:
// $this->writeLog("USER NEW", $username ?? "");
@@ -234,7 +234,7 @@ class ExtraProcesses
/**
* @param string $username
*/
public function onUserLogin($username = ""): void
public function onUserLogin($username = "")
{
// PHP example:
// $this->writeLog("USER LOGIN", $username ?? "");
@@ -243,7 +243,7 @@ class ExtraProcesses
/**
* @param string $username
*/
public function onUserLogout($username = ""): void
public function onUserLogout($username = "")
{
// PHP example:
// $this->writeLog("USER LOGOUT", $username ?? "");
@@ -252,7 +252,7 @@ class ExtraProcesses
/**
* @param string $username
*/
public function onUserLoginFail($username = ""): void
public function onUserLoginFail($username = "")
{
// PHP example:
// $this->writeLog("USER LOGIN FAIL", $username ?? "");
@@ -262,7 +262,7 @@ class ExtraProcesses
* @param string $result
* @param string $status
*/
public function onBugCheckResult($result = "", $status = ""): void
public function onBugCheckResult($result = "", $status = "")
{
// PHP example:
// $this->writeLog("BUG CHECK", $result . " : ". var_export($status, true));