summaryrefslogtreecommitdiffstats
path: root/includes/admin/views
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-08 20:50:39 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-08 20:55:59 +0200
commit30f12e61317d9b181efb46382a4db98d73f65954 (patch)
treef98c5695836a8d04367a7a1969b12903402f7d7b /includes/admin/views
parent88de0f55d7499009f0f316262757e70385d43ce5 (diff)
downloadgigologadmin-30f12e61317d9b181efb46382a4db98d73f65954.tar.gz
gigologadmin-30f12e61317d9b181efb46382a4db98d73f65954.tar.bz2
gigologadmin-30f12e61317d9b181efb46382a4db98d73f65954.zip
Autofixes by Psalm
Diffstat (limited to 'includes/admin/views')
-rw-r--r--includes/admin/views/giglog_admin_page.php6
-rw-r--r--includes/admin/views/giglog_import_gigs.php4
2 files changed, 6 insertions, 4 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 85c4193..624566f 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -36,7 +36,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
echo(GiglogAdmin_AdminPage::editforms()); //not sure why it doesn't show without the echo?
}
- static function get_allvenues(int $invenue): string
+ static function get_allvenues( ?int $invenue ): string
{
$select = '<select name="selectvenueadmin">';
$select .= '<option value="">Please Select..</option>';
@@ -50,7 +50,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
}
- static function get_user( int $cid, int $ctype): string
+ static function get_user( ?int $cid, string $ctype): string
{
$hf_user = wp_get_current_user();
$hf_username = $hf_user->user_login;
@@ -419,7 +419,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
wp_mail( $to, $subject, $body, $headers );
}
- static function returnuser($p1, $c): string
+ static function returnuser(string $p1, ?int $c): string
{
global $wpdb;
$hf_user = wp_get_current_user();
diff --git a/includes/admin/views/giglog_import_gigs.php b/includes/admin/views/giglog_import_gigs.php
index badd678..0e7406f 100644
--- a/includes/admin/views/giglog_import_gigs.php
+++ b/includes/admin/views/giglog_import_gigs.php
@@ -50,8 +50,10 @@ if ( !class_exists( 'GiglogAdmin_ImportGigsPage' ) ) {
* Empty lines are ignored.
*
* @return void
+ *
+ * @param ArrayAccess|array $file
*/
- static function process_upload($file): void {
+ static function process_upload(array $file): void {
$newconcert= [];
$fo = new SplFileObject($file['tmp_name']);