Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-36015 lib/bennu: use static functions correctly.

  • Loading branch information...
commit 84b3cbab33b27774018c6e2593ae75179537f4fe 1 parent 562dbe4
@doctorlard doctorlard authored
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/bennu/bennu.class.php
  2. +5 −5 lib/bennu/iCalendar_parameters.php
View
4 lib/bennu/bennu.class.php
@@ -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
View
10 lib/bennu/iCalendar_parameters.php
@@ -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 @@ function multiple_values_allowed($parameter) {
}
}
- function default_value($parameter) {
+ static function default_value($parameter) {
switch($parameter) {
case 'CUTYPE': return 'INDIVIDUAL';
case 'FBTYPE': return 'BUSY';
@@ -38,7 +38,7 @@ function default_value($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 @@ function is_valid_value(&$parent_property, $parameter, $value) {
}
}
- 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 @@ function do_value_formatting($parameter, $value) {
}
}
- function undo_value_formatting($parameter, $value) {
+ static function undo_value_formatting($parameter, $value) {
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.