Code Duplication    Length = 3-3 lines in 2 locations

packages/back/src/class-compatibility.php 2 locations

@@ 29-31 (lines=3) @@
26
	 * @param string $feature The feature label.
27
	 */
28
	public static function add_feature( $plugin, $feature ) {
29
		if ( ! array_key_exists( $plugin, static::$features ) || ! is_array( static::$features[ $plugin ] ) ) {
30
			static::$features[ $plugin ] = array();
31
		}
32
33
		if ( ! in_array( $feature, static::$features[ $plugin ], true ) ) {
34
			static::$features[ $plugin ][] = $feature;
@@ 61-63 (lines=3) @@
58
	 * @param string $plugin The plugin slug.
59
	 */
60
	public static function add_plugin( $plugin ) {
61
		if ( empty( static::$features[ $plugin ] ) || ! is_array( static::$features[ $plugin ] ) ) {
62
			static::$features[ $plugin ] = array();
63
		}
64
	}
65
66
}