Skip to content

Commit a8af7b3

Browse files
committed
Minor coding style adjustments
1 parent 8a416c9 commit a8af7b3

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

classes/condition.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424

2525
namespace availability_stash;
26-
defined('MOODLE_INTERNAL') || die();
2726

2827
use block_stash\manager;
2928
use block_stash\stash;
@@ -41,12 +40,18 @@
4140
*/
4241
class condition extends \core_availability\condition {
4342

43+
/** Equal condition. */
4444
const EQUAL = '==';
45+
/** Less than condition. */
4546
const LESSTHAN = '<';
47+
/** More than condition. */
4648
const MORETHAN = '>';
4749

50+
/** @var string The condition. */
4851
protected $condition = self::EQUAL;
52+
/** @var int The quantity. */
4953
protected $quantity = 1;
54+
/** @var int|null The object ID. */
5055
protected $objectid = null;
5156

5257
/**
@@ -120,7 +125,7 @@ public function is_available($not, \core_availability\info $info, $grabthelot, $
120125
*
121126
* @param bool $full Set true if this is the 'full information' view.
122127
* @param bool $not Set true if we are inverting the condition.
123-
* @param info $info Item we're checking.
128+
* @param \core_availability\info $info Item we're checking.
124129
* @return string Information string (for admin) about all restrictions on this item.
125130
*/
126131
public function get_description($full, $not, \core_availability\info $info) {
@@ -185,6 +190,7 @@ protected function get_generic_description($not) {
185190
/**
186191
* Get the name of the object in this rule.
187192
*
193+
* @param \core_availability\info $info Availability info.
188194
* @return string
189195
*/
190196
protected function get_object_name(\core_availability\info $info) {

classes/frontend.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424

2525
namespace availability_stash;
26-
defined('MOODLE_INTERNAL') || die();
2726

2827
use block_stash\manager;
2928

@@ -86,8 +85,8 @@ protected function get_javascript_init_params($course, \cm_info $cm = null, \sec
8685
// Yes, it's very unreadable...
8786
$name = format_string($item->get_name(), true, ['context' => $manager->get_context()]);
8887
return (object) ['id' => $item->get_id(), 'name' => $name];
89-
}, $items)
90-
]];
88+
}, $items),
89+
], ];
9190
}
9291

9392
}

classes/privacy/provider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424

2525
namespace availability_stash\privacy;
2626

27-
defined('MOODLE_INTERNAL') || die();
28-
29-
use \core_privacy\local\metadata\null_provider;
27+
use core_privacy\local\metadata\null_provider;
3028

3129
/**
3230
* Privacy class for requesting user data.
@@ -45,7 +43,7 @@ class provider implements null_provider {
4543
*
4644
* @return string
4745
*/
48-
public static function _get_reason() {
46+
public static function _get_reason() { // @codingStandardsIgnoreLine
4947
return 'privacy:null';
5048
}
5149
}

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
$plugin->component = 'availability_stash';
3030
$plugin->release = '1.2.1';
3131
$plugin->maturity = MATURITY_STABLE;
32-
$plugin->dependencies = array(
32+
$plugin->dependencies = [
3333
'block_stash' => 2016052300,
34-
);
34+
];

0 commit comments

Comments
 (0)