mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
add cs fixer and PHPStan and activate it (build 436)
This commit is contained in:
@@ -1,28 +1,34 @@
|
||||
<?php #plain
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\Utils\DataProvider;
|
||||
|
||||
define("ZM_START_TIME", microtime(true));
|
||||
define("ZM_DATA", ZMConfig::get("global", "zm_data"));
|
||||
define("APP_VERSION", LOAD_MODE == 1 ? (json_decode(file_get_contents(DataProvider::getSourceRootDir() . "/composer.json"), true)["version"] ?? "unknown") : "unknown");
|
||||
define("CRASH_DIR", ZMConfig::get("global", "crash_dir"));
|
||||
define("MAIN_WORKER", ZMConfig::get("global", "worker_cache")["worker"] ?? 0);
|
||||
if (!is_dir(ZM_DATA)) @mkdir(ZM_DATA);
|
||||
if (!is_dir(CRASH_DIR)) @mkdir(CRASH_DIR);
|
||||
define('ZM_START_TIME', microtime(true));
|
||||
define('ZM_DATA', ZMConfig::get('global', 'zm_data'));
|
||||
define('APP_VERSION', LOAD_MODE == 1 ? (json_decode(file_get_contents(DataProvider::getSourceRootDir() . '/composer.json'), true)['version'] ?? 'unknown') : 'unknown');
|
||||
define('CRASH_DIR', ZMConfig::get('global', 'crash_dir'));
|
||||
define('MAIN_WORKER', ZMConfig::get('global', 'worker_cache')['worker'] ?? 0);
|
||||
if (!is_dir(ZM_DATA)) {
|
||||
@mkdir(ZM_DATA);
|
||||
}
|
||||
if (!is_dir(CRASH_DIR)) {
|
||||
@mkdir(CRASH_DIR);
|
||||
}
|
||||
|
||||
define("CONN_WEBSOCKET", 0);
|
||||
define("CONN_HTTP", 1);
|
||||
define("ZM_MATCH_ALL", 0);
|
||||
define("ZM_MATCH_FIRST", 1);
|
||||
define("ZM_MATCH_NUMBER", 2);
|
||||
define("ZM_MATCH_SECOND", 3);
|
||||
define("ZM_BREAKPOINT", 'if(\ZM\Framework::$argv["debug-mode"]) extract(\Psy\debug(get_defined_vars(), isset($this) ? $this : @get_called_class()));');
|
||||
define("BP", ZM_BREAKPOINT);
|
||||
define("ZM_DEFAULT_FETCH_MODE", 4);
|
||||
const CONN_WEBSOCKET = 0;
|
||||
const CONN_HTTP = 1;
|
||||
const ZM_MATCH_ALL = 0;
|
||||
const ZM_MATCH_FIRST = 1;
|
||||
const ZM_MATCH_NUMBER = 2;
|
||||
const ZM_MATCH_SECOND = 3;
|
||||
const ZM_BREAKPOINT = 'if(\ZM\Framework::$argv["debug-mode"]) extract(\Psy\debug(get_defined_vars(), isset($this) ? $this : @get_called_class()));';
|
||||
const BP = ZM_BREAKPOINT;
|
||||
const ZM_DEFAULT_FETCH_MODE = 4;
|
||||
|
||||
define("ZM_LOG_ERROR", 0);
|
||||
define("ZM_LOG_WARNING", 1);
|
||||
define("ZM_LOG_INFO", 2);
|
||||
define("ZM_LOG_VERBOSE", 3);
|
||||
define("ZM_LOG_DEBUG", 4);
|
||||
const ZM_LOG_ERROR = 0;
|
||||
const ZM_LOG_WARNING = 1;
|
||||
const ZM_LOG_INFO = 2;
|
||||
const ZM_LOG_VERBOSE = 3;
|
||||
const ZM_LOG_DEBUG = 4;
|
||||
|
||||
Reference in New Issue
Block a user