ruleset = new Ruleset(strict: true); $this->ruleset->validate_or_exit(); parent::__construct(); } public function main(): Response { $truncate = $this->db->execute_query("DELETE FROM `" . StatsTable::NAME . "`"); // Add a dummy row to run the MariaDB INSERT AFTER Trigger on the coffee database table $insert = $this->db->for(CoffeeTable::NAME)->insert([CoffeeTable::ID->value => 0]); // Remove the dummy row $remove = $this->db->for(CoffeeTable::NAME)->where([CoffeeTable::ID->value => 0])->delete(); return $truncate && $insert && $remove ? new Response() : new Response("Error", 500); } }