diff --git a/public/main/admin/user_move_stats.php b/public/main/admin/user_move_stats.php
index b6a66b2431..80e783721b 100644
--- a/public/main/admin/user_move_stats.php
+++ b/public/main/admin/user_move_stats.php
@@ -266,7 +266,7 @@ if (isset($_REQUEST['load_ajax'])) {
while ($row = Database::fetch_array($res, 'ASSOC')) {
//Checking if the LP exist in the new session
//if (in_array($row['lp_id'], array_keys($flat_list))) {
- $list[$row['id']] = $row;
+ $list[$row['id']] = $row;
//}
}
@@ -319,7 +319,7 @@ if (isset($_REQUEST['load_ajax'])) {
while ($row = Database::fetch_array($res, 'ASSOC')) {
//Checking if the LP exist in the new session
//if (in_array($row['lp_id'], array_keys($flat_list))) {
- $list[$row['id']] = $row;
+ $list[$row['id']] = $row;
//}
}
diff --git a/public/main/attendance/index.php b/public/main/attendance/index.php
index c4485c89d9..9814acf6ba 100644
--- a/public/main/attendance/index.php
+++ b/public/main/attendance/index.php
@@ -41,7 +41,6 @@ $actions = [
'calendar_all_delete',
];
-
$action = 'attendance_list';
if (isset($_REQUEST['action']) && (in_array($_REQUEST['action'], $actions))) {
$action = $_REQUEST['action'];
@@ -422,7 +421,7 @@ switch ($action) {
$my_calendar_id = $filter_type;
$filter_type = 'calendar_id';
}
- $attendant_calendar = $attendance->get_attendance_calendar(
+ $attendant_calendar = $attendance->get_attendance_calendar(
$attendanceId,
$filter_type,
$my_calendar_id,
@@ -630,7 +629,7 @@ switch ($action) {
exit;
} else {
// calendar edit form
- $content .= '
';
+ $content .= '
';
$form = new FormValidator(
'attendance_calendar_edit',
'POST',
@@ -648,7 +647,7 @@ switch ($action) {
$form->addButtonCancel(get_lang('Cancel'), 'cancel');
$form->setDefaults($defaults);
$content .= $form->returnForm();
- $content .= '
';
+ $content .= '
';
}
break;
case 'calendar_all_delete':
@@ -673,7 +672,6 @@ switch ($action) {
header('Location: '.$currentUrl.'&action=calendar_list&attendance_id='.$attendanceId);
exit;
break;
- //no break
case 'calendar_list':
$groupList = isset($_POST['groups']) ? [$_POST['groups']] : [];
$attendance_calendar = $attendance->get_attendance_calendar(
@@ -727,12 +725,12 @@ switch ($action) {
$groupIdList[$group['id']] = $group['name'];
}
- $content .= Display::page_subheader(get_lang('Calendar list of attendances'));
- $content .= '';
+ $content .= Display::page_subheader(get_lang('Calendar list of attendances'));
+ $content .= '';
if (!empty($attendance_calendar)) {
foreach ($attendance_calendar as $calendar) {
- $content .= '- ';
- $content .= Display::return_icon(
+ $content .= '
- ';
+ $content .= Display::return_icon(
'lp_calendar_event.png',
get_lang('Date DateTime time'),
null,
@@ -747,28 +745,28 @@ switch ($action) {
if (isset($calendar['groups']) && !empty($calendar['groups'])) {
foreach ($calendar['groups'] as $group) {
- $content .= ' '.Display::label($groupIdList[$group['group_id']]);
+ $content .= ' '.Display::label($groupIdList[$group['group_id']]);
}
}
if (!$is_locked_attendance || api_is_platform_admin()) {
if (api_is_allowed_to_edit()) {
- $content .= '';
}
}
- $content .= '
';
+ $content .= '';
}
- /* } else {
- echo Display::return_message(get_lang('There is no date/time registered yet'), 'warning');
- }*/
- $content .= '
';
+ /* } else {
+ echo Display::return_message(get_lang('There is no date/time registered yet'), 'warning');
+ }*/
+ $content .= '
';
}
break;
diff --git a/public/main/auth/courses_controller.php b/public/main/auth/courses_controller.php
index 7f2e29a832..7755bef305 100644
--- a/public/main/auth/courses_controller.php
+++ b/public/main/auth/courses_controller.php
@@ -2,7 +2,6 @@
/* For licensing terms, see /license.txt */
-use Chamilo\CoreBundle\Repository\SequenceResourceRepository;
use Chamilo\CoreBundle\Entity\SequenceResource;
use Chamilo\CoreBundle\Entity\SessionRelCourse;
use Chamilo\CoreBundle\Entity\Tag;
@@ -361,7 +360,7 @@ class CoursesController
/**
* Return Session catalog rendered view.
*
- * @param array $limit
+ * @param array $limit
*/
public function sessionList($limit = [])
{
@@ -614,7 +613,7 @@ class CoursesController
$hasRequirements = false;
foreach ($sequences as $sequence) {
- if (count($sequence['requirements']) === 0) {
+ if (0 === count($sequence['requirements'])) {
continue;
}
$hasRequirements = true;
diff --git a/public/main/webservices/api/v2.php b/public/main/webservices/api/v2.php
index 9e2334ea48..cb1adf5536 100644
--- a/public/main/webservices/api/v2.php
+++ b/public/main/webservices/api/v2.php
@@ -84,7 +84,7 @@ try {
throw new Exception(get_lang('NoData'));
}
- $messageStatus = $action === Rest::POST_USER_MESSAGE_READ ? MESSAGE_STATUS_NEW : MESSAGE_STATUS_UNREAD;
+ $messageStatus = Rest::POST_USER_MESSAGE_READ === $action ? MESSAGE_STATUS_NEW : MESSAGE_STATUS_UNREAD;
$data = array_flip($messagesId);