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 fc8fe965b7
commit abeffdd8e4
  1. 1
      main/admin/course_export.php
  2. 1
      main/gradebook/gradebook_display_summary.php
  3. 2
      main/gradebook/lib/be/dropboxlink.class.php
  4. 2
      main/gradebook/lib/be/linkfactory.class.php
  5. 2
      main/inc/lib/access_url_edit_users_to_url_functions.lib.php
  6. 2
      main/inc/lib/add_course.lib.inc.php
  7. 2
      main/inc/lib/exercise.lib.php
  8. 2
      main/inc/lib/legal.lib.php
  9. 2
      main/inc/lib/redirect.class.php
  10. 1
      main/install/ajax.php
  11. 1
      main/survey/ch_dropdown.php
  12. 2
      plugin/openmeetings/lib/openmeetings_rest_service.php
  13. 6
      src/Chamilo/CoreBundle/Component/Editor/Editor.php
  14. 2
      src/Chamilo/CoreBundle/Entity/TrackStoredValuesStack.php
  15. 2
      src/Chamilo/ThemeBundle/Model/UserModel.php

@ -99,6 +99,7 @@ if (isset($_POST['formSent']) && $_POST['formSent']) {
break;
case 'csv':
Export::arrayToCsv($listToExport, $archiveFile);
break;
case 'xls':
Export::arrayToXls($listToExport, $archiveFile);
break;

@ -31,7 +31,6 @@ $userList = CourseManager::get_user_list_from_course_code(
switch ($action) {
case 'export_all':
$params = array();
$pdf = new PDF('A4', 'P', $params);

@ -57,7 +57,7 @@ class DropboxLink extends EvalLink
*/
private function get_dropbox_table()
{
$this->dropbox_table = Database :: get_course_table(TABLE_DROPBOX_FILE);
$this->dropbox_table = Database::get_course_table(TABLE_DROPBOX_FILE);
return $this->dropbox_table;
}

@ -44,7 +44,7 @@ class LinkFactory
*/
public function get_evaluation_link($eval_id)
{
$links = AbstractLink :: load(null, null, $eval_id);
$links = AbstractLink::load(null, null, $eval_id);
foreach ($links as $link) {
if (is_a($link, 'EvalLink')) {
return $link;

@ -49,7 +49,7 @@ class Accessurledituserstourl
$rs = Database::query($sql);
$i=0;
while ($user = Database :: fetch_array($rs)) {
while ($user = Database::fetch_array($rs)) {
$i++;
if ($i<=10) {
$return .= '<a href="javascript: void(0);" onclick="javascript: add_user_to_url(\''.addslashes($user['user_id']).'\',\''.api_get_person_name(addslashes($user['firstname']), addslashes($user['lastname'])).' ('.addslashes($user['username']).')'.'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />';

@ -26,7 +26,7 @@ class AddCourse
$add_unique_prefix = false,
$use_code_indepedent_keys = true
) {
$course_table = Database :: get_main_table(TABLE_MAIN_COURSE);
$course_table = Database::get_main_table(TABLE_MAIN_COURSE);
$wanted_code = CourseManager::generate_course_code($wanted_code);
$keys_course_code = $wanted_code;
if (!$use_code_indepedent_keys) {

@ -1364,7 +1364,7 @@ HTML;
$result = Database::query($sql);
$row = Database::fetch_array($result, 'ASSOC');
if (!empty($row['expired_time'])) {
$current_expired_time_key = ExerciseLib::get_time_control_key(
$current_expired_time_key = self::get_time_control_key(
$exercise_id,
$lp_id,
$lp_item_id

@ -31,7 +31,7 @@ class LegalManager
$time = time();
if ($last['content'] != $content) {
$version = intval(LegalManager::get_last_condition_version($language));
$version = intval(self::get_last_condition_version($language));
$version++;
$params = [
'language_id' => $language,

@ -24,7 +24,7 @@ class Redirect
public static function go($url = '')
{
if (empty($url)) {
Redirect::session_request_uri();
self::session_request_uri();
$www = self::www();
self::navigate($www);
}

@ -62,7 +62,6 @@ switch ($action) {
echo $countOfTables;
break;
case 'remove_crs_tables':
$statement = $manager
->getConnection()
->executeQuery("SHOW TABLES LIKE '$db_c_prefix$db_prefix%'");

@ -29,6 +29,7 @@ class ch_dropdown extends survey_question
* @param FormValidator $form
* @param array $questionData
* @param array $answers
* @return void
*/
public function render(FormValidator $form, $questionData = array(), $answers = '')
{

@ -90,7 +90,7 @@ class OpenMeetingsRestService
The exact error is returned in the XML response.' );
return false;
break;
default :
default:
error_log( 'Your call to OpenMeetings Web Services '.$extra.' returned an unexpected HTTP status of: ' . $status_code [0] . " Request " . $request );
return false;
}

@ -128,15 +128,19 @@ class Editor
case 'boolean':
return $var ? 'true' : 'false'; // Lowercase necessary!
case 'integer':
//no break
case 'double':
return (string)$var;
//no break
case 'resource':
//no break
case 'string':
return '"'.str_replace(
array("\r", "\n", "<", ">", "&"),
array('\r', '\n', '\x3c', '\x3e', '\x26'),
addslashes($var)
).'"';
break;
case 'array':
// Arrays in JSON can't be associative. If the array is empty or if it
// has sequential whole number keys starting with 0, it's not associative
@ -149,6 +153,7 @@ class Editor
return '[ '.implode(', ', $output).' ]';
}
break;
case 'object':
// Otherwise, fall through to convert the array as an object.
$output = array();
@ -156,6 +161,7 @@ class Editor
$output[] = $this->toJavascript(strval($k)).': '.$this->toJavascript($v);
}
return '{ '.implode(', ', $output).' }';
break;
default:
return 'null';
}

@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM;
* @ORM\Entity
*/
class TrackStoredValuesStack
{
{
/**
* @var integer
*

@ -8,7 +8,7 @@
namespace Chamilo\ThemeBundle\Model;
class UserModel implements UserInterface
class UserModel implements UserInterface
{
/**

Loading…
Cancel
Save