From 368f9aa9a9ddc2bbbd4b8cc1f9f3435674e18401 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Wed, 19 Apr 2017 10:58:07 -0500 Subject: [PATCH] Minor - Code style --- main/exercise/question_pool.php | 2 +- main/gradebook/lib/scoredisplay.class.php | 2 +- main/inc/lib/security.lib.php | 2 +- main/lp/aiccResource.class.php | 1 + main/lp/learnpath.class.php | 2 +- plugin/buycourses/src/service_process_confirm.php | 2 -- .../CourseBundle/Component/CourseCopy/CourseSelectForm.php | 1 + 7 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/exercise/question_pool.php b/main/exercise/question_pool.php index 7106226f93..2cf7bd7973 100755 --- a/main/exercise/question_pool.php +++ b/main/exercise/question_pool.php @@ -916,7 +916,7 @@ function get_action_icon_for_question( $url ); break; - default : + default: $res = $in_action; break; } diff --git a/main/gradebook/lib/scoredisplay.class.php b/main/gradebook/lib/scoredisplay.class.php index b3aad72636..a5718dd968 100755 --- a/main/gradebook/lib/scoredisplay.class.php +++ b/main/gradebook/lib/scoredisplay.class.php @@ -41,7 +41,7 @@ class ScoreDisplay } elseif (!isset($score2)) { return -1; } else { - $scoredisplay = ScoreDisplay::instance(); + $scoredisplay = self::instance(); $custom1 = $scoredisplay->display_custom($score1); $custom2 = $scoredisplay->display_custom($score2); if ($custom1 == $custom2) { diff --git a/main/inc/lib/security.lib.php b/main/inc/lib/security.lib.php index b250d6b6b0..ee40bca76e 100755 --- a/main/inc/lib/security.lib.php +++ b/main/inc/lib/security.lib.php @@ -468,7 +468,7 @@ class Security public static function getPasswordRequirementsToString($passedConditions = []) { $output = ''; - $setting = Security::getPasswordRequirements(); + $setting = self::getPasswordRequirements(); foreach ($setting as $type => $rules) { foreach ($rules as $rule => $parameter) { if (empty($parameter)) { diff --git a/main/lp/aiccResource.class.php b/main/lp/aiccResource.class.php index 82bbaaee96..18d0c15bfd 100755 --- a/main/lp/aiccResource.class.php +++ b/main/lp/aiccResource.class.php @@ -37,6 +37,7 @@ class aiccResource break; case 'title': $this->title = $value; + // no break - @todo check this, not sure the intention is to have description=title case 'description': $this->description = $value; break; diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index c313886a92..1e5754677f 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -3582,7 +3582,7 @@ class learnpath break; case 4 : break; - default : + default: break; } // Replace & by & because & will break URL with params diff --git a/plugin/buycourses/src/service_process_confirm.php b/plugin/buycourses/src/service_process_confirm.php index 05f3f84e70..7556b3b468 100644 --- a/plugin/buycourses/src/service_process_confirm.php +++ b/plugin/buycourses/src/service_process_confirm.php @@ -81,7 +81,6 @@ switch ($serviceSale['payment_type']) { RedirectToPayPal($expressCheckout['TOKEN']); break; case BuyCoursesPlugin::PAYMENT_TYPE_TRANSFER: - $transferAccounts = $plugin->getTransferAccounts(); $form = new FormValidator('success', 'POST', api_get_self(), null, null, FormValidator::LAYOUT_INLINE); @@ -161,7 +160,6 @@ switch ($serviceSale['payment_type']) { break; case BuyCoursesPlugin::PAYMENT_TYPE_CULQI: - // We need to include the main online script, acording to the Culqi documentation the JS needs to be loeaded // directly from the main url "https://integ-pago.culqi.com" because a local copy of this JS is not supported $htmlHeadXtra[] = ''; diff --git a/src/Chamilo/CourseBundle/Component/CourseCopy/CourseSelectForm.php b/src/Chamilo/CourseBundle/Component/CourseCopy/CourseSelectForm.php index 8495287b39..8c448e1ce1 100644 --- a/src/Chamilo/CourseBundle/Component/CourseCopy/CourseSelectForm.php +++ b/src/Chamilo/CourseBundle/Component/CourseCopy/CourseSelectForm.php @@ -561,6 +561,7 @@ class CourseSelectForm } } } + // no break default: if (!empty($resources) && is_array($resources)) { foreach ($resources as $id => $obj) {