From ecd1eb7848d7657267a55cbee03eb2f90a1ba1b7 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 2 Sep 2021 08:54:58 +0200 Subject: psalm: Ad types to attrs and constructor for Venue --- includes/venue.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/venue.php b/includes/venue.php index aedb6a7..6de14c6 100644 --- a/includes/venue.php +++ b/includes/venue.php @@ -7,11 +7,11 @@ if ( !class_exists('GiglogAdmin_Venue') ) { class GiglogAdmin_Venue { - private $id; - private $name; - private $city; - private $address; - private $webpage; + private int $id; + private string $name; + private string $city; + private string $address; + private string $webpage; /* * Constructs a new venue object from an array of attributes. @@ -19,7 +19,7 @@ if ( !class_exists('GiglogAdmin_Venue') ) { * so this constructor can be used to construct the object * directly from the database row. */ - public function __construct($attrs) + public function __construct(object $attrs) { $this->id = isset($attrs->id) ? $attrs->id : NULL; $this->name = isset($attrs->wpgvenue_name) ? $attrs->wpgvenue_name : NULL; -- cgit v1.2.3