Fix Psalm problems

This commit is contained in:
Narek Zakarian 2022-08-24 16:51:56 +04:00
parent aeb840ff5f
commit 6742229345

View file

@ -422,8 +422,9 @@ return function ( ContainerInterface $container, array $fields ): array {
'default' => ( static function (): string { 'default' => ( static function (): string {
$site_url = get_site_url( get_current_blog_id() ); $site_url = get_site_url( get_current_blog_id() );
$hash = md5( $site_url ); $hash = md5( $site_url );
$letters = preg_replace( '~\d~', '', $hash ); $letters = preg_replace( '~\d~', '', $hash ) ?? '';
return $letters ? substr( $letters, 0, 6 ) . '-' : ''; $prefix = substr( $letters, 0, 6 );
return $prefix ? $prefix . '-' : '';
} )(), } )(),
'screens' => array( 'screens' => array(
State::STATE_START, State::STATE_START,