Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
georgmaisser committed Dec 6, 2024
1 parent f15f970 commit 32c3d0b
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion classes/bo_availability/bo_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ public static function get_conditions(int $condparam = MOD_BOOKING_CONDPARAM_ALL
$instance = new $filename();
}


switch ($condparam) {
case MOD_BOOKING_CONDPARAM_HARDCODED_ONLY:
if ($instance->is_json_compatible() === false) {
Expand Down
1 change: 0 additions & 1 deletion classes/bo_availability/conditions/nooverlapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ public function render_button(
): array {

$label = $this->get_description_string(false, $full, $settings);
// return bo_info::render_button($settings, $userid, $label, 'alert alert-warning', true, $fullwidth, 'alert', 'option'); for optionhasstarted.
$handling = $this->return_handling_from_settings($settings);
switch ($handling) {
case MOD_BOOKING_COND_OVERLAPPING_HANDLING_BLOCK:
Expand Down
2 changes: 0 additions & 2 deletions classes/bo_availability/conditions/nooverlappingproxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public function is_available(booking_option_settings $settings, int $userid, boo
// This is the return value. Not available to begin with.
$isavailable = false;


if (!empty($this->return_handling_from_settings($settings))) {
$isavailable = true;
} else {
Expand Down Expand Up @@ -300,7 +299,6 @@ public function render_button(
): array {

$label = $this->get_description_string(false, $full, $settings);
// return bo_info::render_button($settings, $userid, $label, 'alert alert-warning', true, $fullwidth, 'alert', 'option'); for optionhasstarted.
$handling = $this->return_handling_from_answers($settings->id);
switch ($handling) {
case MOD_BOOKING_COND_OVERLAPPING_HANDLING_BLOCK:
Expand Down
2 changes: 1 addition & 1 deletion classes/booking_campaigns/campaigns_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private static function get_list_of_saved_campaigns(): array {
* Destroys all campaigns in db and singleton.
* @return bool
*/
public static function delete_all_campaigns(): bool{
public static function delete_all_campaigns(): bool {
global $DB;
$DB->delete_records('booking_campaigns');
singleton_service::destroy_all_campaigns();
Expand Down
5 changes: 1 addition & 4 deletions tests/bo_availability/condition_all_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ public function test_booking_bookit_with_pricecategories_and_fallback(array $bda
$price = price::get_price('option', $settings->id);
$this->assertEquals($pricecategorydata2->defaultvalue, $price["price"]);


// Student one should see the the default price.
$this->setUser($student3);
singleton_service::destroy_instance();
Expand Down Expand Up @@ -596,7 +595,6 @@ public function test_booking_bookit_with_pricecategories_and_fallback(array $bda
$price = price::get_price('option', $settings->id);
$this->assertEquals($pricecategorydata2->defaultvalue, $price["price"]);


// Student one should see the the default price.
$this->setUser($student3);
singleton_service::destroy_instance();
Expand All @@ -611,7 +609,6 @@ public function test_booking_bookit_with_pricecategories_and_fallback(array $bda

// Validation that price == category price.
$price = price::get_price('option', $settings->id);
// $this->assertEquals((int)get_config('booking', 'pricecategoryfallback'), $price["price"]);
$this->assertEmpty($price);
}

Expand Down Expand Up @@ -1406,7 +1403,7 @@ public function test_booking_bookwithcredits(array $bdata): void {
'datatype' => 'text',
'shortname' => 'credit',
'name' => 'Credit',
'visible' => PROFILE_VISIBLE_NONE
'visible' => PROFILE_VISIBLE_NONE,
]);

// Create users.
Expand Down
1 change: 0 additions & 1 deletion tests/bo_availability/condition_allowupdate_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
final class condition_allowupdate_test extends advanced_testcase {

/**
* Tests set up.
*/
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024120501;
$plugin->version = 2024120502;
$plugin->requires = 2022112800; // Requires this Moodle version. Current: Moodle 4.1.
$plugin->release = '8.8.7';
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit 32c3d0b

Please sign in to comment.