Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_Field.php 2 locations

@@ 946-952 (lines=7) @@
943
		if ( null === $this->strings ) {
944
			$this->strings = (array) $this->args['text'];
945
946
			if ( is_callable( $this->args['text_cb'] ) ) {
947
				$strings = call_user_func( $this->args['text_cb'], $this );
948
949
				if ( $strings && is_array( $strings ) ) {
950
					$this->strings += $strings;
951
				}
952
			}
953
		}
954
955
		// If we have that string value, send it back.
@@ 983-989 (lines=7) @@
980
981
		$this->field_options = (array) $this->args['options'];
982
983
		if ( is_callable( $this->args['options_cb'] ) ) {
984
			$options = call_user_func( $this->args['options_cb'], $this );
985
986
			if ( $options && is_array( $options ) ) {
987
				$this->field_options = $options + $this->field_options;
988
			}
989
		}
990
991
		if ( $key ) {
992
			return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;