summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-06-18 21:01:36 +0200
committerHarald Eilertsen <haraldei@anduin.net>2022-06-18 21:01:36 +0200
commitc81ced91d25f24b8340187364404a325f7dab30a (patch)
tree4fb24cb4d89f14ff7af2e857963ede73aa0c9e79 /includes
parent75fce31f5345a54082ad241735873c178bf9d785 (diff)
downloadgigologadmin-c81ced91d25f24b8340187364404a325f7dab30a.tar.gz
gigologadmin-c81ced91d25f24b8340187364404a325f7dab30a.tar.bz2
gigologadmin-c81ced91d25f24b8340187364404a325f7dab30a.zip
Get rid of a few deprecation warning.
I think the remaining deprecation warnings now are from WordPress itself.
Diffstat (limited to 'includes')
-rw-r--r--includes/concert.php18
-rw-r--r--includes/venue.php6
2 files changed, 12 insertions, 12 deletions
diff --git a/includes/concert.php b/includes/concert.php
index fed48a5..2849dba 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -333,15 +333,15 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) {
/**
* Return database id for concert.
*/
- public function id() {
- return $this->id;
+ public function id() : int {
+ return $this->id ? $this->id : 0;
}
/**
* Return the concert "name".
*/
- public function cname() {
- return $this->cname;
+ public function cname() : string {
+ return $this->cname ? $this->cname : '';
}
/**
@@ -355,27 +355,27 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) {
* Return the date of the concert.
*/
public function cdate() {
- return $this->cdate;
+ return $this->cdate ? $this->cdate : '';
}
/**
* Return the ticket url for the concert.
*/
public function tickets() {
- return $this->tickets;
+ return $this->tickets ? $this->tickets : '';
}
/**
* Return the event link for the concert.
*/
public function eventlink() {
- return $this->eventlink;
+ return $this->eventlink ? $this->eventlink : '';
}
/**
* Return the status of the concert.
*/
- public function status() {
+ public function status() : int {
return $this->status;
}
@@ -394,7 +394,7 @@ if ( ! class_exists( 'GiglogAdmin_Concert' ) ) {
* @return array<string, string>
*/
public function roles() : array {
- return $this->roles;
+ return $this->roles ? $this->roles : array();
}
/**
diff --git a/includes/venue.php b/includes/venue.php
index b6f9956..a436f91 100644
--- a/includes/venue.php
+++ b/includes/venue.php
@@ -152,15 +152,15 @@ if ( ! class_exists( 'GiglogAdmin_Venue' ) ) {
$this->id = $wpdb->insert_id;
}
- public function id() {
+ public function id() : int {
return $this->id;
}
- public function name() {
+ public function name() : string {
return $this->name;
}
- public function city() {
+ public function city() : string {
return $this->city;
}
}