summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-09-02 08:54:58 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-09-02 08:54:58 +0200
commitecd1eb7848d7657267a55cbee03eb2f90a1ba1b7 (patch)
tree68015e021bb337e6649bc958f8468581ca681ba7
parent9c4793526c46deed2b20f1a1ed494d69c4f58e97 (diff)
downloadgigologadmin-ecd1eb7848d7657267a55cbee03eb2f90a1ba1b7.tar.gz
gigologadmin-ecd1eb7848d7657267a55cbee03eb2f90a1ba1b7.tar.bz2
gigologadmin-ecd1eb7848d7657267a55cbee03eb2f90a1ba1b7.zip
psalm: Ad types to attrs and constructor for Venue
-rw-r--r--includes/venue.php12
1 files changed, 6 insertions, 6 deletions
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;