has_grant($permission_id, $person_id)) { show_report($report_prefix, $report_name, $permission_id); } } function show_report(string $report_prefix, string $report_name, string $lang_key = ''): void { $lang_key = empty($lang_key) ? $report_name : $lang_key; $report_label = lang($lang_key); $report_prefix = empty($report_prefix) ? '' : $report_prefix . '.'; // no summary nor detailed reports for receivings if(!empty($report_label) && $report_label != $lang_key . ' (TBD)') //TODO: String Interpolation. Also !== {//TODO: Is there a better way to do this? breaking the php like this makes it more difficult to read. ?> ">