diff options
-rw-r--r-- | includes/concert.php | 18 | ||||
-rw-r--r-- | includes/venue.php | 6 |
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; } } |