Update from PSR-2 to PSR-12

- Tabs are indent
- Warning at 120, Error at 240 char length
This commit is contained in:
Clemens Schwaighofer
2021-07-14 10:00:56 +09:00
parent 11daac6d23
commit 6722468bdb
96 changed files with 2855 additions and 1677 deletions

View File

@@ -1,10 +1,12 @@
<?php declare(strict_types=1);
<?php
/*
* direct write to log file
* must have BASE folder and LOG foder defined
*/
declare(strict_types=1);
namespace CoreLibs\Debug;
class FileWriter
@@ -40,10 +42,10 @@ class FileWriter
if (!self::$debug_filename) {
return false;
}
if (!is_writeable(BASE.LOG)) {
if (!is_writeable(BASE . LOG)) {
return false;
}
$filename = BASE.LOG.self::$debug_filename;
$filename = BASE . LOG . self::$debug_filename;
$fh = fopen($filename, 'a');
if ($fh === false) {
return false;
@@ -51,7 +53,8 @@ class FileWriter
if ($enter === true) {
$string .= "\n";
}
$string = "[".\CoreLibs\Debug\Support::printTime()."] [".\CoreLibs\Get\System::getPageName(2)."] - ".$string;
$string = "[" . \CoreLibs\Debug\Support::printTime() . "] "
. "[" . \CoreLibs\Get\System::getPageName(2) . "] - " . $string;
fwrite($fh, $string);
fclose($fh);
return true;