eee
This commit is contained in:
+20
-23
@@ -80,9 +80,9 @@ if (!function_exists('application')) {
|
|||||||
|
|
||||||
if (!function_exists('task')) {
|
if (!function_exists('task')) {
|
||||||
/**
|
/**
|
||||||
* @param string $handler
|
* @param string $handler
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @param int $dstWorkerId
|
* @param int $dstWorkerId
|
||||||
* @param callable|null $finishFinishCallback
|
* @param callable|null $finishFinishCallback
|
||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
@@ -98,9 +98,9 @@ if (!function_exists('task')) {
|
|||||||
if (!function_exists('taskWait')) {
|
if (!function_exists('taskWait')) {
|
||||||
/**
|
/**
|
||||||
* @param string $handler
|
* @param string $handler
|
||||||
* @param mixed $data
|
* @param mixed $data
|
||||||
* @param float $timeout
|
* @param float $timeout
|
||||||
* @param int $dstWorkerId
|
* @param int $dstWorkerId
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -166,8 +166,7 @@ if (!function_exists('isJson')) {
|
|||||||
{
|
{
|
||||||
if (is_null($string))
|
if (is_null($string))
|
||||||
return false;
|
return false;
|
||||||
return (str_starts_with($string, '{') && str_ends_with($string, '}'))
|
return (str_starts_with($string, '{') && str_ends_with($string, '}')) || (str_ends_with($string, '[') && str_starts_with($string, ']'));
|
||||||
|| (str_ends_with($string, '[') && str_starts_with($string, ']'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -176,7 +175,7 @@ if (!function_exists('instance')) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $class
|
* @param $class
|
||||||
* @param array $constrict
|
* @param array $constrict
|
||||||
* @param array $config
|
* @param array $config
|
||||||
* @return null|object
|
* @return null|object
|
||||||
@@ -195,7 +194,7 @@ if (!function_exists('call')) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $handler
|
* @param $handler
|
||||||
* @param mixed ...$params
|
* @param mixed ...$params
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws
|
* @throws
|
||||||
@@ -449,9 +448,9 @@ if (!function_exists('trim_blank')) {
|
|||||||
/**
|
/**
|
||||||
* 空白字符替换
|
* 空白字符替换
|
||||||
* @param string $content 内容
|
* @param string $content 内容
|
||||||
* @param int $len 截取长度
|
* @param int $len 截取长度
|
||||||
* @param string $encode 编码
|
* @param string $encode 编码
|
||||||
* @param bool $htmlTags
|
* @param bool $htmlTags
|
||||||
* @return array|string|null
|
* @return array|string|null
|
||||||
*/
|
*/
|
||||||
function trim_blank(string $content, int $len = 0, string $encode = 'utf-8', bool $htmlTags = TRUE): array|string|null
|
function trim_blank(string $content, int $len = 0, string $encode = 'utf-8', bool $htmlTags = TRUE): array|string|null
|
||||||
@@ -745,8 +744,8 @@ if (!function_exists('on')) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @param $callback
|
* @param $callback
|
||||||
* @param int $index
|
* @param int $index
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
@@ -779,7 +778,7 @@ if (!function_exists('off')) {
|
|||||||
if (!function_exists('process_name_set')) {
|
if (!function_exists('process_name_set')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $pid
|
* @param int $pid
|
||||||
* @param string|null $prefix
|
* @param string|null $prefix
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
@@ -816,7 +815,7 @@ if (!function_exists('zero_full')) {
|
|||||||
if (!function_exists('env')) {
|
if (!function_exists('env')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $key
|
* @param $key
|
||||||
* @param null $default
|
* @param null $default
|
||||||
* @return array|string|null
|
* @return array|string|null
|
||||||
*/
|
*/
|
||||||
@@ -835,7 +834,7 @@ if (!function_exists('env')) {
|
|||||||
if (!function_exists('config')) {
|
if (!function_exists('config')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $key
|
* @param $key
|
||||||
* @param null $default
|
* @param null $default
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
@@ -850,7 +849,7 @@ if (!function_exists('config')) {
|
|||||||
if (!function_exists('created')) {
|
if (!function_exists('created')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $key
|
* @param $key
|
||||||
* @param array $construct
|
* @param array $construct
|
||||||
* @param array $config
|
* @param array $config
|
||||||
* @return null|object
|
* @return null|object
|
||||||
@@ -1029,9 +1028,7 @@ if (!function_exists('json_log')) {
|
|||||||
];
|
];
|
||||||
$param['data'] = $data;
|
$param['data'] = $data;
|
||||||
|
|
||||||
file_put_contents(storage('exception-' . date('Y-m-d') . '.log','exception'),
|
file_put_contents(storage('exception-' . date('Y-m-d') . '.log', 'exception'), json_encode($param, JSON_UNESCAPED_UNICODE) . PHP_EOL, FILE_APPEND);
|
||||||
json_encode($param, JSON_UNESCAPED_UNICODE),
|
|
||||||
FILE_APPEND);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1039,7 +1036,7 @@ if (!function_exists('json_log')) {
|
|||||||
if (!function_exists('map')) {
|
if (!function_exists('map')) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $map
|
* @param array $map
|
||||||
* @param Closure $closure
|
* @param Closure $closure
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user