Fix PHPStan level 6 errors from CI
- Remove unused AvailabilityRepository/BookingRepository from BookingPage and ShortcodeRegistrar (template is a JS shell; no PHP data needed yet) - Add @param array<string, string> to shortcode render() signatures - Add @return array<string, mixed> to model toArray() methods - Fix get_permalink() ?? '' — returns string|false not nullable, use cast - Remove unused ignoreErrors pattern from phpstan.neon Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,10 +5,13 @@ namespace Unsupervised\Schedular\Frontend;
|
||||
|
||||
class LoginPage
|
||||
{
|
||||
/**
|
||||
* @param array<string, string> $atts
|
||||
*/
|
||||
public function render(array $atts): string
|
||||
{
|
||||
if (is_user_logged_in()) {
|
||||
$redirect = esc_url(get_permalink());
|
||||
$redirect = esc_url((string) get_permalink());
|
||||
return sprintf(
|
||||
'<p>%s <a href="%s">%s</a>.</p>',
|
||||
esc_html__('You are already logged in.', 'unsupervised-schedular'),
|
||||
@@ -18,7 +21,7 @@ class LoginPage
|
||||
}
|
||||
|
||||
$error = '';
|
||||
$redirect = sanitize_url(get_permalink() ?? '');
|
||||
$redirect = sanitize_url((string) get_permalink());
|
||||
|
||||
if (isset($_POST['us_login']) && check_admin_referer('us_student_login')) {
|
||||
$credentials = [
|
||||
|
||||
Reference in New Issue
Block a user