summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--includes/concert.php4
-rw-r--r--psalm.xml1
6 files changed, 7 insertions, 6 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= [];
diff --git a/includes/concert.php b/includes/concert.php
index 91fbe57..a8c71db 100644
--- a/includes/concert.php
+++ b/includes/concert.php
@@ -78,8 +78,8 @@ if ( !class_exists('GiglogAdmin_Concert') ) {
/**
* Return the concert with the given id.
*
- * @param int $id.
- * @return null|self.
+ * @param int $id
+ * @return null|self
*/
static function get( int $id ) : ?self
{
diff --git a/psalm.xml b/psalm.xml
index 6b0f00f..877390a 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -19,7 +19,6 @@ SPDX-License-Identifier: CC0-1.0
<directory name="includes"/>
<ignoreFiles>
<directory name="vendor"/>
- <directory name="includes/public/shortcodes" />
</ignoreFiles>
</projectFiles>