Minor - Code style - Use "self" instead of classname within the class and remove spaces around :: operator

pull/2487/head
Yannick Warnier 8 years ago
parent 3bfbeee958
commit fc8fe965b7
  1. 4
      main/attendance/index.php
  2. 2
      main/auth/cas/lib/CAS.php
  3. 2
      main/exercise/export/exercise_import.php
  4. 4
      main/inc/lib/groupmanager.lib.php
  5. 1
      main/inc/lib/mp3player/is_autostart.as.php
  6. 2
      plugin/dashboard/block_global_info/block_global_info.class.php
  7. 2
      src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php
  8. 4
      src/Chamilo/ThemeBundle/Model/TaskModel.php

@ -285,12 +285,16 @@ switch ($action) {
} }
break; break;
case 'calendar_add': case 'calendar_add':
//no break
case 'calendar_edit': case 'calendar_edit':
//no break
case 'calendar_all_delete': case 'calendar_all_delete':
//no break
case 'calendar_delete': case 'calendar_delete':
if (!api_is_allowed_to_edit(null, true)) { if (!api_is_allowed_to_edit(null, true)) {
api_not_allowed(); api_not_allowed();
} }
//no break
case 'calendar_list': case 'calendar_list':
$attendanceController->attendance_calendar($action, $attendance_id, $calendar_id); $attendanceController->attendance_calendar($action, $attendance_id, $calendar_id);
break; break;

@ -1013,7 +1013,7 @@ class phpCAS
self::trace('user is not authenticated, redirecting to the CAS server'); self::trace('user is not authenticated, redirecting to the CAS server');
$PHPCAS_CLIENT->forceAuthentication(); $PHPCAS_CLIENT->forceAuthentication();
} else { } else {
self::trace('no need to authenticate (user `' . phpCAS:: getUser() . '\' is already authenticated)'); self::trace('no need to authenticate (user `' . self::getUser() . '\' is already authenticated)');
} }
self::traceEnd(); self::traceEnd();

@ -34,7 +34,6 @@ $cmd = (isset($_REQUEST['cmd'])? $_REQUEST['cmd'] : 'show_import');
switch ($cmd) { switch ($cmd) {
case 'show_import': case 'show_import':
$display = '<p>' $display = '<p>'
. get_lang('Imported exercises must consist of a zip or an XML file (IMS-QTI) and be compatible with your Claroline version.') . '<br>' . get_lang('Imported exercises must consist of a zip or an XML file (IMS-QTI) and be compatible with your Claroline version.') . '<br>'
. '</p>' . '</p>'
@ -47,7 +46,6 @@ switch ($cmd) {
. '<br><br>' . '<br><br>'
. '<small>' . get_lang('Max file size') . ' : 2&nbsp;MB</small>' . '<small>' . get_lang('Max file size') . ' : 2&nbsp;MB</small>'
. '</form>'; . '</form>';
break; break;
case 'import': case 'import':
//include needed librabries for treatment //include needed librabries for treatment

@ -911,7 +911,7 @@ class GroupManager
if (!empty($groups)) { if (!empty($groups)) {
foreach ($groups as $group) { foreach ($groups as $group) {
GroupManager::set_group_properties( self::set_group_properties(
$group['id'], $group['id'],
$group['name'], $group['name'],
$group['description'], $group['description'],
@ -2143,7 +2143,7 @@ class GroupManager
$row[] = $this_group['id']; $row[] = $this_group['id'];
} }
if (GroupManager::userHasAccessToBrowse($user_id, $this_group, $session_id)) { if (self::userHasAccessToBrowse($user_id, $this_group, $session_id)) {
// Group name // Group name
$groupNameClass = null; $groupNameClass = null;
if ($this_group['status'] == 0) { if ($this_group['status'] == 0) {

@ -22,4 +22,3 @@ switch ($_SESSION['whereami']) {
} }
echo utf8_encode('autostart='.$autostart); echo utf8_encode('autostart='.$autostart);
?>

@ -95,7 +95,7 @@ class BlockGlobalInfo extends Block
$content = '<h4>'.get_lang('GlobalPlatformInformation').'</h4>'; $content = '<h4>'.get_lang('GlobalPlatformInformation').'</h4>';
$data_table = null; $data_table = null;
if (!empty($global_data)) { if (!empty($global_data)) {
$data_table = '<table class="table table-bordered" width:"95%">'; $data_table = '<table class="table table-bordered" width="95%">';
$i = 1; $i = 1;
foreach ($global_data as $data) { foreach ($global_data as $data) {
if ($i%2 == 0) { if ($i%2 == 0) {

@ -3236,12 +3236,14 @@ class CourseRestorer
if (!empty($workData)) { if (!empty($workData)) {
continue; continue;
} }
break;
case FILE_OVERWRITE: case FILE_OVERWRITE:
// Creating folder. // Creating folder.
$workData = get_work_data_by_path( $workData = get_work_data_by_path(
$path, $path,
$this->destination_course_info['real_id'] $this->destination_course_info['real_id']
); );
break;
case FILE_RENAME: case FILE_RENAME:
$obj->params['new_dir'] = $obj->params['title']; $obj->params['new_dir'] = $obj->params['title'];

@ -42,7 +42,7 @@ class TaskModel implements TaskInterface
/** /**
* @var string * @var string
*/ */
protected $color = TaskModel::COLOR_AQUA; protected $color = self::COLOR_AQUA;
/** /**
* @var null * @var null
@ -54,7 +54,7 @@ class TaskModel implements TaskInterface
* @param int $progress * @param int $progress
* @param string $color * @param string $color
*/ */
function __construct($title = null, $progress = 0, $color = TaskModel::COLOR_AQUA) function __construct($title = null, $progress = 0, $color = self::COLOR_AQUA)
{ {
$this->color = $color; $this->color = $color;
$this->progress = $progress; $this->progress = $progress;

Loading…
Cancel
Save