diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-06-12 18:24:01 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-06-12 18:24:01 +0200 |
commit | 5af89bca3bd17777fae94e681882d6eabf152303 (patch) | |
tree | 29df8d816b0054a70fdf612514a0154b7c174ba0 /includes | |
parent | b5c2165f0369391bd2367f2df4a3ee9a903b7eb9 (diff) | |
download | gigologadmin-5af89bca3bd17777fae94e681882d6eabf152303.tar.gz gigologadmin-5af89bca3bd17777fae94e681882d6eabf152303.tar.bz2 gigologadmin-5af89bca3bd17777fae94e681882d6eabf152303.zip |
Fix misc Psalm issues.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/admin/views/giglog_admin_page.php | 2 | ||||
-rw-r--r-- | includes/admin/views/giglog_import_gigs.php | 2 | ||||
-rw-r--r-- | includes/concert.php | 2 | ||||
-rw-r--r-- | includes/concertlogs.php | 2 | ||||
-rw-r--r-- | includes/venue.php | 4 |
5 files changed, 8 insertions, 4 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index 6f0b2ba..ab71270 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -9,6 +9,8 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { require_once __DIR__ . '/../../venue.php'; class GiglogAdmin_AdminPage { + private string $username; + public function __construct() { $this->username = wp_get_current_user()->user_login; diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php index a8daa3f..aeaf974 100644 --- a/includes/admin/views/giglog_import_gigs.php +++ b/includes/admin/views/giglog_import_gigs.php @@ -51,7 +51,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) { * * @return void * - * @param ArrayAccess|array $file + * @param array<int, mixed> */ static function process_upload(array $file): void { $newconcert= []; diff --git a/includes/concert.php b/includes/concert.php index 455bc82..56021f5 100644 --- a/includes/concert.php +++ b/includes/concert.php @@ -6,6 +6,8 @@ // SPDX-License-Identifier: AGPL-3.0-or-later if ( !class_exists('GiglogAdmin_Concert') ) { + require_once __DIR__ . '/venue.php'; + class GiglogAdmin_Concert { private $id; diff --git a/includes/concertlogs.php b/includes/concertlogs.php index 8b485ca..cd0a330 100644 --- a/includes/concertlogs.php +++ b/includes/concertlogs.php @@ -82,7 +82,7 @@ if ( !class_exists( 'GiglogAdmin_Concertlogs' ) ) public function get_assigned_role(string $username) : ?string { - return array_search( $username, $this->roles ); + return array_search( $username, $this->roles ) || NULL; } public function assigned_user(string $role) : ?string diff --git a/includes/venue.php b/includes/venue.php index f9f7e4f..aedb6a7 100644 --- a/includes/venue.php +++ b/includes/venue.php @@ -31,8 +31,8 @@ if ( !class_exists('GiglogAdmin_Venue') ) { /** * Get venue by given id. * - * @param int $id. - * @return null|self. + * @param int $id + * @return null|self */ static function get(int $id) : ?self { |