summaryrefslogtreecommitdiffstats
path: root/includes/admin/views
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:26:46 +0100
committerHarald Eilertsen <haraldei@anduin.net>2022-03-09 21:26:46 +0100
commit82a3901a6d68f088aff335a1bc88b9878e17e990 (patch)
treec2d21122fa8104cb393b7dd83d9379bceaf27954 /includes/admin/views
parent06d0591af5f2c9e0ce1c4269c55a503e9956759d (diff)
downloadgigologadmin-82a3901a6d68f088aff335a1bc88b9878e17e990.tar.gz
gigologadmin-82a3901a6d68f088aff335a1bc88b9878e17e990.tar.bz2
gigologadmin-82a3901a6d68f088aff335a1bc88b9878e17e990.zip
Fix various psalm errors.
Diffstat (limited to 'includes/admin/views')
-rw-r--r--includes/admin/views/_concerts_table.php2
-rw-r--r--includes/admin/views/_edit_concert_form.php2
-rw-r--r--includes/admin/views/giglog_admin_page.php2
-rw-r--r--includes/admin/views/giglog_import_gigs.php2
4 files changed, 5 insertions, 3 deletions
diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php
index e9598e1..7b4338c 100644
--- a/includes/admin/views/_concerts_table.php
+++ b/includes/admin/views/_concerts_table.php
@@ -25,6 +25,8 @@ if (!class_exists("GiglogAdmin_ConcertsTable"))
];
private string $username;
+ private array $filter;
+ private int $page_no;
public function __construct() {
$this->username = wp_get_current_user()->user_login;
diff --git a/includes/admin/views/_edit_concert_form.php b/includes/admin/views/_edit_concert_form.php
index 6e4f5e5..c7b8780 100644
--- a/includes/admin/views/_edit_concert_form.php
+++ b/includes/admin/views/_edit_concert_form.php
@@ -20,7 +20,7 @@ if (!class_exists("GiglogAdmin_EditConcertForm"))
private function user_dropdown_for_role( GiglogAdmin_Concert $concert, string $role): string
{
$users = array_map(
- fn($usr) => $usr->user_login,
+ fn($usr): string => $usr->user_login,
get_users( array( 'fields' => array( 'user_login' ) ) ) );
$roles = $concert->roles();
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 13c08b9..b0b018c 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -158,7 +158,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
];
$concert = GiglogAdmin_Concert::get(intval($_POST['pid']));
- if ($concert->update((object) $attributes)) {
+ if ($concert && $concert->update((object) $attributes)) {
// let user know the concert was updated.
// Look into admin_notices
}
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index 1a72fe1..62717c6 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -53,7 +53,7 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
*
* @return void
*
- * @param array<int, mixed>
+ * @param array<mixed>
*/
static function process_upload(array $file): void {
$newconcert= [];