From 7721cce204b41f130288dc7b0dc503c2e59fdc98 Mon Sep 17 00:00:00 2001 From: Peter Rundqvist Date: Tue, 7 Sep 2021 09:12:49 +0200 Subject: [PATCH] Fixed codechecker flagged errors --- classes/attendance_webservices_handler.php | 2 +- tests/externallib_test.php | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/classes/attendance_webservices_handler.php b/classes/attendance_webservices_handler.php index 2439bc7..d0c0d7a 100644 --- a/classes/attendance_webservices_handler.php +++ b/classes/attendance_webservices_handler.php @@ -172,7 +172,7 @@ class attendance_handler { $sessionsinfo = array(); - foreach($sessions as $session) { + foreach ($sessions as $session) { $sessionsinfo[$session->id] = self::get_session($session->id); } diff --git a/tests/externallib_test.php b/tests/externallib_test.php index a97c9c3..3a70d8a 100644 --- a/tests/externallib_test.php +++ b/tests/externallib_test.php @@ -479,21 +479,21 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { $courseswithsessions = external_api::clean_returnvalue(mod_attendance_external::get_courses_with_today_sessions_returns(), $courseswithsessions); - foreach($courseswithsessions as $course) { + foreach ($courseswithsessions as $course) { $attendanceinstances = $course['attendance_instances']; - foreach($attendanceinstances as $attendanceinstance) { + foreach ($attendanceinstances as $attendanceinstance) { $sessionsinfo = $attendanceinstance['today_sessions']; - foreach($sessionsinfo as $sessioninfo) { + foreach ($sessionsinfo as $sessioninfo) { $sessions = attendance_handler::get_sessions($sessioninfo['attendanceid']); $sessions = external_api::clean_returnvalue(mod_attendance_external::get_sessions_returns(), $sessions); - foreach($sessions as $session) { + foreach ($sessions as $session) { $sessiontocompareagainst = attendance_handler::get_session($session['id']); $sessiontocompareagainst = external_api::clean_returnvalue(mod_attendance_external::get_session_returns(), $sessiontocompareagainst); @@ -504,7 +504,6 @@ class mod_attendance_external_testcase extends externallib_advanced_testcase { } } } - } - + } } }