Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_Field.php 2 locations

@@ 987-993 (lines=7) @@
984
		if ( null === $this->strings ) {
985
			$this->strings = (array) $this->args['text'];
986
987
			if ( is_callable( $this->args['text_cb'] ) ) {
988
				$strings = call_user_func( $this->args['text_cb'], $this );
989
990
				if ( $strings && is_array( $strings ) ) {
991
					$this->strings += $strings;
992
				}
993
			}
994
		}
995
996
		// If we have that string value, send it back.
@@ 1024-1030 (lines=7) @@
1021
1022
		$this->field_options = (array) $this->args['options'];
1023
1024
		if ( is_callable( $this->args['options_cb'] ) ) {
1025
			$options = call_user_func( $this->args['options_cb'], $this );
1026
1027
			if ( $options && is_array( $options ) ) {
1028
				$this->field_options += $options;
1029
			}
1030
		}
1031
1032
		if ( $key ) {
1033
			return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;