Fix lint.

This commit is contained in:
Pedro Silva 2024-02-28 11:22:44 +00:00
parent 562a9eed4c
commit 59b5af65bd
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3

View file

@ -45,7 +45,19 @@ class AdminNotices implements ModuleInterface {
add_action(
Repository::NOTICES_FILTER,
/**
* Adds persisted notices to the notices array.
*
* @param array $notices The notices.
* @return array
*
* @psalm-suppress MissingClosureParamType
*/
function ( $notices ) use ( $c ) {
if ( ! is_array( $notices ) ) {
return $notices;
}
$admin_notices = $c->get( 'admin-notices.repository' );
assert( $admin_notices instanceof Repository );