Code Duplication    Length = 11-11 lines in 2 locations

packages/jitm/src/class-message.php 2 locations

@@ 523-533 (lines=11) @@
520
			// check for installed plugins.
521
			$score = (int) array_reduce(
522
				$this->installed_plugins,
523
				function ( $score, $plugin ) use ( &$installed_plugins ) {
524
					if ( true !== $score && $score > 0 ) {
525
						return $score;
526
					}
527
528
					if ( isset( $installed_plugins[ $plugin ] ) ) {
529
						return 1;
530
					}
531
532
					return 0;
533
				},
534
				true
535
			);
536
@@ 543-553 (lines=11) @@
540
541
			$score = (int) array_reduce(
542
				$this->uninstalled_plugins,
543
				function ( $score, $plugin ) use ( &$installed_plugins ) {
544
					if ( true !== $score && $score > 0 ) {
545
						return $score;
546
					}
547
548
					if ( isset( $installed_plugins[ $plugin ] ) ) {
549
						return 0;
550
					}
551
552
					return 1;
553
				},
554
				true
555
			);
556