diff options
| author | 2021-12-31 17:00:51 +0100 | |
|---|---|---|
| committer | 2021-12-31 17:00:51 +0100 | |
| commit | 77e9877316fcfacb26799afdf32d94c8411da80e (patch) | |
| tree | 7fd9c85bf4854054be6536c14d120bc8b790debe /app/actualize_script.php | |
| parent | 09c84fb3bc44bf8e45619c27acc15b967aea14ce (diff) | |
Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/
```sh
composer run-script phpstan
```
* More fixes
* Fix global variables
* Add .phtml
* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090
* Fix more warnings
* Fix view errors and enable in CI
* ReturnTypeWillChange
* Dynamic view type
* Fix Minz static/self bug
Diffstat (limited to 'app/actualize_script.php')
| -rwxr-xr-x | app/actualize_script.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/actualize_script.php b/app/actualize_script.php index 1e3514de7..721376f62 100755 --- a/app/actualize_script.php +++ b/app/actualize_script.php @@ -2,20 +2,6 @@ <?php require(__DIR__ . '/../cli/_cli.php'); -/** - * Writes to FreshRSS admin log, and if it is not already done by default, - * writes to syslog (only if simplepie_syslog_enabled in FreshRSS configuration) and to STDOUT - */ -function notice($message) { - Minz_Log::notice($message, ADMIN_LOG); - if (!COPY_LOG_TO_SYSLOG && SIMPLEPIE_SYSLOG_ENABLED) { - syslog(LOG_NOTICE, $message); - } - if (defined('STDOUT') && !COPY_SYSLOG_TO_STDERR) { - fwrite(STDOUT, $message . "\n"); //Unbuffered - } -} - session_cache_limiter(''); ob_implicit_flush(false); ob_start(); @@ -35,6 +21,20 @@ FreshRSS_Context::initSystem(); FreshRSS_Context::$system_conf->auth_type = 'none'; // avoid necessity to be logged in (not saved!) define('SIMPLEPIE_SYSLOG_ENABLED', FreshRSS_Context::$system_conf->simplepie_syslog_enabled); +/** + * Writes to FreshRSS admin log, and if it is not already done by default, + * writes to syslog (only if simplepie_syslog_enabled in FreshRSS configuration) and to STDOUT + */ +function notice($message) { + Minz_Log::notice($message, ADMIN_LOG); + if (!COPY_LOG_TO_SYSLOG && SIMPLEPIE_SYSLOG_ENABLED) { + syslog(LOG_NOTICE, $message); + } + if (defined('STDOUT') && !COPY_SYSLOG_TO_STDERR) { + fwrite(STDOUT, $message . "\n"); //Unbuffered + } +} + notice('FreshRSS starting feeds actualization at ' . $begin_date->format('c')); // make sure the PHP setup of the CLI environment is compatible with FreshRSS as well |
