Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_Field.php 2 locations

@@ 952-958 (lines=7) @@
949
		if ( null === $this->strings ) {
950
			$this->strings = (array) $this->args['text'];
951
952
			if ( is_callable( $this->args['text_cb'] ) ) {
953
				$strings = call_user_func( $this->args['text_cb'], $this );
954
955
				if ( $strings && is_array( $strings ) ) {
956
					$this->strings += $strings;
957
				}
958
			}
959
		}
960
961
		// If we have that string value, send it back.
@@ 989-995 (lines=7) @@
986
987
		$this->field_options = (array) $this->args['options'];
988
989
		if ( is_callable( $this->args['options_cb'] ) ) {
990
			$options = call_user_func( $this->args['options_cb'], $this );
991
992
			if ( $options && is_array( $options ) ) {
993
				$this->field_options = $options + $this->field_options;
994
			}
995
		}
996
997
		if ( $key ) {
998
			return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;