Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fc1b16f33 | |||
| 103b757a05 | |||
| b52270ff25 | |||
| c0aa9acb19 |
+1
-1
@@ -37,7 +37,7 @@ if (!function_exists('json_validator')) {
|
||||
*/
|
||||
function json_validator(string $data): bool
|
||||
{
|
||||
return is_null(json_decode($data));
|
||||
return is_array(json_decode($data, true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -95,6 +95,16 @@ class StdoutLogger extends Component
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
* @return void
|
||||
*/
|
||||
public function println(string $message): void
|
||||
{
|
||||
file_put_contents('php://output', '[' . date('Y-m-d H:i:s') . '] ' . $message . PHP_EOL, FILE_APPEND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
|
||||
Reference in New Issue
Block a user