@@ -204,7 +204,7 @@ public function subsubsub(): string {
204204 *
205205 * @codeCoverageIgnore
206206 */
207- public function register () {
207+ public function register (): void {
208208 register_setting ( 'msls ' , 'msls ' , array ( $ this , 'validate ' ) );
209209
210210 $ sections = array (
@@ -310,8 +310,8 @@ public function rewrites_section(): int {
310310 }
311311
312312 /**
313- * @param array $map
314- * @param string $section
313+ * @param array<string, string> $map
314+ * @param string $section
315315 *
316316 * @return int
317317 */
@@ -336,7 +336,7 @@ protected function add_settings_fields( array $map, string $section ): int {
336336 /**
337337 * Shows the select-form-field 'blog_language'
338338 */
339- public function blog_language () {
339+ public function blog_language (): void {
340340 $ languages = $ this ->options ->get_available_languages ();
341341 $ selected = get_locale ();
342342
@@ -346,14 +346,14 @@ public function blog_language() {
346346 /**
347347 * Shows the select-form-field 'display'
348348 */
349- public function display () {
350- echo ( new Select ( 'display ' , MslsLink::get_types_description (), $ this ->options ->display ) )->render ();
349+ public function display (): void {
350+ echo ( new Select ( 'display ' , MslsLink::get_types_description (), strval ( $ this ->options ->display ) ) )->render ();
351351 }
352352
353353 /**
354354 * Shows the select-form-field 'admin_display'
355355 */
356- public function admin_display () {
356+ public function admin_display (): void {
357357 echo ( new Select (
358358 'admin_display ' ,
359359 array (
@@ -367,7 +367,7 @@ public function admin_display() {
367367 /**
368368 * Shows the select-form-field 'reference_user'
369369 */
370- public function reference_user () {
370+ public function reference_user (): void {
371371 $ users = array ();
372372
373373 foreach ( (array ) apply_filters ( 'msls_reference_users ' , $ this ->collection ->get_users () ) as $ user ) {
@@ -386,16 +386,16 @@ public function reference_user() {
386386 trigger_error ( sprintf ( $ format , self ::MAX_REFERENCE_USERS ) );
387387 }
388388
389- echo ( new Select ( 'reference_user ' , $ users , $ this ->options ->reference_user ) )->render ();
389+ echo ( new Select ( 'reference_user ' , $ users , strval ( $ this ->options ->reference_user ) ) )->render ();
390390 }
391391
392392 /**
393393 * The description for the current blog
394394 *
395395 * The language will be used ff there is no description.
396396 */
397- public function description () {
398- echo ( new Text ( 'description ' , $ this ->options ->description , ' 40 ' ) )->render ();
397+ public function description (): void {
398+ echo ( new Text ( 'description ' , $ this ->options ->description , 40 ) )->render ();
399399 }
400400
401401 /**
@@ -405,20 +405,20 @@ public function description() {
405405 * trouble. So you can decide a higher (from 1) or a lower (to 100) priority
406406 * for the output
407407 */
408- public function content_priority () {
408+ public function content_priority (): void {
409409 $ temp = array_merge ( range ( 1 , 10 ), array ( 20 , 50 , 100 ) );
410410 $ arr = array_combine ( $ temp , $ temp );
411411 $ selected = empty ( $ this ->options ->content_priority ) ? 10 : $ this ->options ->content_priority ;
412412
413- echo ( new Select ( 'content_priority ' , $ arr , $ selected ) )->render ();
413+ echo ( new Select ( 'content_priority ' , $ arr , strval ( $ selected ) ) )->render ();
414414 }
415415
416416 /**
417417 * Rewrites slugs for registered post types
418418 *
419- * @param string $key
419+ * @param mixed $key
420420 */
421- public function render_rewrite ( $ key ) {
421+ public function render_rewrite ( $ key ): void {
422422 $ rewrite = get_post_type_object ( $ key )->rewrite ;
423423
424424 $ value = '' ;
@@ -434,9 +434,9 @@ public function render_rewrite( $key ) {
434434 /**
435435 * Validates input before saving it
436436 *
437- * @param array $arr Values of the submitted form
437+ * @param array<string, mixed> $arr Values of the submitted form
438438 *
439- * @return array Validated input
439+ * @return array<string, mixed>
440440 */
441441 public function validate ( array $ arr ) {
442442 /**
@@ -459,9 +459,9 @@ public function validate( array $arr ) {
459459 /**
460460 * Filter which sets the global blog language
461461 *
462- * @param array $arr
462+ * @param string[] $arr
463463 *
464- * @return array
464+ * @return string[]
465465 */
466466 public function set_blog_language ( array $ arr ) {
467467 if ( isset ( $ arr ['blog_language ' ] ) ) {
0 commit comments