From 7f4159ac258c501f9666efc465a78cb2aec9d177 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 21 Sep 2020 21:21:30 +0200 Subject: Code cleanup - Remove unused variables - Remove unused utility functions - Asserting presence and typehinting global variables - Remove unused variables - Add missing global - Add parameter type constraint - Fix some references to nonexisting variables --- ratatoeskr/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ratatoeskr/main.php') diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php index 491c739..9bbe504 100644 --- a/ratatoeskr/main.php +++ b/ratatoeskr/main.php @@ -46,8 +46,6 @@ function _ratatoeskr() { global $backend_subactions, $ste, $url_handlers, $ratatoeskr_settings, $plugin_objs, $api_compat; - $ts_start = microtime(true); - session_start(); db_connect(); clean_database(); @@ -60,6 +58,7 @@ function _ratatoeskr() $activeplugins = array_filter(Plugin::all(), function ($plugin) { return $plugin->active; }); + /** @var Plugin $plugin */ foreach ($activeplugins as $plugin) { if (!in_array($plugin->api, $api_compat)) { $plugin->active = false; @@ -68,6 +67,7 @@ function _ratatoeskr() } eval($plugin->code); + /** @var RatatoeskrPlugin $plugin_obj */ $plugin_obj = new $plugin->classname($plugin->get_id()); if ($plugin->update) { $plugin_obj->update(); -- cgit v1.2.3-70-g09d2