Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_Field.php 2 locations

@@ 975-981 (lines=7) @@
972
		if ( null === $this->strings ) {
973
			$this->strings = (array) $this->args['text'];
974
975
			if ( is_callable( $this->args['text_cb'] ) ) {
976
				$strings = call_user_func( $this->args['text_cb'], $this );
977
978
				if ( $strings && is_array( $strings ) ) {
979
					$this->strings += $strings;
980
				}
981
			}
982
		}
983
984
		// If we have that string value, send it back.
@@ 1012-1018 (lines=7) @@
1009
1010
		$this->field_options = (array) $this->args['options'];
1011
1012
		if ( is_callable( $this->args['options_cb'] ) ) {
1013
			$options = call_user_func( $this->args['options_cb'], $this );
1014
1015
			if ( $options && is_array( $options ) ) {
1016
				$this->field_options = $options + $this->field_options;
1017
			}
1018
		}
1019
1020
		if ( $key ) {
1021
			return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;