Code Duplication    Length = 7-7 lines in 2 locations

includes/CMB2_Field.php 2 locations

@@ 980-986 (lines=7) @@
977
		if ( null === $this->strings ) {
978
			$this->strings = (array) $this->args['text'];
979
980
			if ( is_callable( $this->args['text_cb'] ) ) {
981
				$strings = call_user_func( $this->args['text_cb'], $this );
982
983
				if ( $strings && is_array( $strings ) ) {
984
					$this->strings += $strings;
985
				}
986
			}
987
		}
988
989
		// If we have that string value, send it back.
@@ 1017-1023 (lines=7) @@
1014
1015
		$this->field_options = (array) $this->args['options'];
1016
1017
		if ( is_callable( $this->args['options_cb'] ) ) {
1018
			$options = call_user_func( $this->args['options_cb'], $this );
1019
1020
			if ( $options && is_array( $options ) ) {
1021
				$this->field_options = $options + $this->field_options;
1022
			}
1023
		}
1024
1025
		if ( $key ) {
1026
			return array_key_exists( $key, $this->field_options ) ? $this->field_options[ $key ] : false;