mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-36015 lib/bennu: use static functions correctly.
This commit is contained in:
parent
ccd90e765e
commit
f335bebd83
@ -13,14 +13,14 @@
|
||||
*/
|
||||
|
||||
class Bennu {
|
||||
function timestamp_to_datetime($t = NULL) {
|
||||
static function timestamp_to_datetime($t = NULL) {
|
||||
if($t === NULL) {
|
||||
$t = time();
|
||||
}
|
||||
return gmstrftime('%Y%m%dT%H%M%SZ', $t);
|
||||
}
|
||||
|
||||
function generate_guid() {
|
||||
static function generate_guid() {
|
||||
// Implemented as per the Network Working Group draft on UUIDs and GUIDs
|
||||
|
||||
// These two octets get special treatment
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
class iCalendar_parameter {
|
||||
function multiple_values_allowed($parameter) {
|
||||
static function multiple_values_allowed($parameter) {
|
||||
switch($parameter) {
|
||||
case 'DELEGATED-FROM':
|
||||
case 'DELEGATED-TO':
|
||||
@ -25,7 +25,7 @@ class iCalendar_parameter {
|
||||
}
|
||||
}
|
||||
|
||||
function default_value($parameter) {
|
||||
static function default_value($parameter) {
|
||||
switch($parameter) {
|
||||
case 'CUTYPE': return 'INDIVIDUAL';
|
||||
case 'FBTYPE': return 'BUSY';
|
||||
@ -38,7 +38,7 @@ class iCalendar_parameter {
|
||||
}
|
||||
}
|
||||
|
||||
function is_valid_value(&$parent_property, $parameter, $value) {
|
||||
static function is_valid_value(&$parent_property, $parameter, $value) {
|
||||
switch($parameter) {
|
||||
// These must all be a URI
|
||||
case 'ALTREP':
|
||||
@ -191,7 +191,7 @@ class iCalendar_parameter {
|
||||
}
|
||||
}
|
||||
|
||||
function do_value_formatting($parameter, $value) {
|
||||
static function do_value_formatting($parameter, $value) {
|
||||
switch($parameter) {
|
||||
// Parameters of type CAL-ADDRESS or URI MUST be double-quoted
|
||||
case 'ALTREP':
|
||||
@ -232,7 +232,7 @@ class iCalendar_parameter {
|
||||
}
|
||||
}
|
||||
|
||||
function undo_value_formatting($parameter, $value) {
|
||||
static function undo_value_formatting($parameter, $value) {
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user