Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fmido88 committed Apr 8, 2024
1 parent 61a2f80 commit f4a9430
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 17 deletions.
1 change: 0 additions & 1 deletion classes/coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ public function apply_coupon($area = self::AREA_TOPUP, $areaid = 0) {
$fee = (float)$util->get_cost_after_discount();
$plugin = new wallet();


if ($this->type == self::ENROL
|| (
($this->type == self::CATEGORY || $this->type == self::FIXED)
Expand Down
4 changes: 3 additions & 1 deletion classes/deleteselectedusers_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** The form to confirm the intention to bulk delete users enrolments.
/**
* The form to confirm the intention to bulk delete users enrolments.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
7 changes: 5 additions & 2 deletions classes/deleteselectedusers_operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** A bulk operation for the wallet enrolment plugin to delete selected users enrolments.
/**
* A bulk operation for the wallet enrolment plugin to delete selected users enrolments.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -23,7 +25,8 @@
namespace enrol_wallet;
use enrol_wallet\deleteselectedusers_form;

/** A bulk operation for the wallet enrolment plugin to delete selected users enrolments.
/**
* A bulk operation for the wallet enrolment plugin to delete selected users enrolments.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
Expand Down
4 changes: 3 additions & 1 deletion classes/editselectedusers_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** The form to collect required information when bulk editing users enrolments.
/**
* The form to collect required information when bulk editing users enrolments.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
4 changes: 3 additions & 1 deletion classes/editselectedusers_operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** A bulk operation for the wallet enrolment plugin to edit selected users.
/**
* A bulk operation for the wallet enrolment plugin to edit selected users.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
4 changes: 3 additions & 1 deletion classes/form/applycoupon_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** Form to apply coupons in the enrolment page.
/**
* Form to apply coupons in the enrolment page.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
6 changes: 4 additions & 2 deletions classes/form/charger_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** The form that able the user to topup their wallet using payment gateways.
/**
* Charger form.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand All @@ -31,7 +33,7 @@
use enrol_wallet\util\discount_rules;

/**
* The form that able the user to topup their wallet using payment gateways.
* The form by which managers could charge others manually.
* @package enrol_wallet
*/
class charger_form extends \moodleform {
Expand Down
6 changes: 4 additions & 2 deletions classes/form/enrol_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@

require_once($CFG->libdir.'/formslib.php');

/** Enrollment form.
/**
* Enrollment form.
*
* @package enrol_wallet
*/
class enrol_form extends \moodleform {
/**
Expand All @@ -40,7 +42,7 @@ class enrol_form extends \moodleform {
protected $instance;
/**
* toomany
* @var
* @var bool
*/
protected $toomany = false;

Expand Down
4 changes: 3 additions & 1 deletion classes/form/insuf_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** This is really just a display for user that he has insufficient wallet ballance to enrol.
/**
* This is really just a display for user that he has insufficient wallet ballance to enrol.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
4 changes: 3 additions & 1 deletion classes/form/topup_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/** The form that able the user to topup their wallet using payment gateways.
/**
* The form that able the user to topup their wallet using payment gateways.
*
* @package enrol_wallet
* @copyright 2023 Mo Farouk <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
23 changes: 20 additions & 3 deletions tests/coupons_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,32 @@
final class coupons_test extends \advanced_testcase {

/**
* Categories.
* Category 1.
* @var object
*/
private $cat1, $cat2, $cat3, $cat4;
private $cat1;
/**
* Category 2.
* @var object
*/
private $cat2;
/**
* Category 3.
* @var object
*/
private $cat3;
/**
* Category 4.
* @var object
*/
private $cat4;
/** Course 1 @var \stdClass */
private $c1;
/**
* Courses
* @var \stdClass
*/
private $c1, $c2, $c3, $c4, $c5, $c6, $c7;
private $c2, $c3, $c4, $c5, $c6, $c7;
/**
* Users
* @var \stdClass
Expand Down
2 changes: 1 addition & 1 deletion tests/transactions_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class transactions_test extends \advanced_testcase {

/**
* The transactions class.
* @var
* @var \enrol_wallet\transactions
*/
private $transactions;

Expand Down

0 comments on commit f4a9430

Please sign in to comment.