src/Config_Command.php
private function return_value( $name, $type, $values ) {
		$results = array();
		foreach ( $values as $value ) {
			if ( $name === $value['name'] && ( 'all' === $type || $type === $value['type'] ) ) {
				$results[] = $value;
			}
		}

		if ( count( $results ) > 1 ) {
			WP_CLI::error( "Found both a constant and a variable '{$name}' in the 'wp-config.php' file. Use --type=<type> to disambiguate." );
		}

		if ( ! empty( $results ) ) {
			return $results[0]['value'];
		}

		$type      = 'all' === $type ? 'constant or variable' : $type;
		$names     = array_column( $values, 'name' );
		$candidate = Utils\get_suggestion( $name, $names );

		if ( ! empty( $candidate ) && $candidate !== $name ) {
			WP_CLI::error( "The {$type} '{$name}' is not defined in the 'wp-config.php' file.\nDid you mean '{$candidate}'?" );
		}

		WP_CLI::error( "The {$type} '{$name}' is not defined in the 'wp-config.php' file." );
	}
private function return_value( $name, $type, $values ) {
		$results = array();
		foreach ( $values as $value ) {
			if ( $name === $value['name'] && ( 'all' === $type || $type === $value['type'] ) ) {
				$results[] = $value;
			}
		}

		if ( count( $results ) > 1 ) {
			WP_CLI::error( "Found both a constant and a variable '{$name}' in the 'wp-config.php' file. Use --type=<type> to disambiguate." );
		}

		if ( ! empty( $results ) ) {
			return $results[0]['value'];
		}

		$type      = 'all' === $type ? 'constant or variable' : $type;
		$names     = array_column( $values, 'name' );
		$candidate = Utils\get_suggestion( $name, $names );

		if ( ! empty( $candidate ) && $candidate !== $name ) {
			WP_CLI::error( "The {$type} '{$name}' is not defined in the 'wp-config.php' file.\nDid you mean '{$candidate}'?" );
		}

		WP_CLI::error( "The {$type} '{$name}' is not defined in the 'wp-config.php' file." );
	}
private function return_value ( $ name , $ type , $ values ) { $ results = array ( ) ; foreach ( $ values as $ value ) { if ( $ name === $ value [ 'name' ] && ( 'all' === $ type || $ type === $ value [ 'type' ] ) ) { $ results [ ] = $ value ; } } if ( count ( $ results ) > 1 ) { WP_CLI :: error ( "Found both a constant and a variable '{$name}' in the 'wp-config.php' file. Use --type=<type> to disambiguate." ) ; } if ( ! empty ( $ results ) ) { return $ results [ 0 ] [ 'value' ] ; } $ type = 'all' === $ type ? 'constant or variable' : $ type ; $ names = array_column ( $ values , 'name' ) ; $ candidate = Utils \ get_suggestion ( $ name , $ names ) ; if ( ! empty ( $ candidate ) && $ candidate !== $ name ) { WP_CLI :: error ( "The {$type} '{$name}' is not defined in the 'wp-config.php' file.\nDid you mean '{$candidate}'?" ) ; } WP_CLI :: error ( "The {$type} '{$name}' is not defined in the 'wp-config.php' file." ) ; }
Prints the value of a constant or variable defined in the wp-config.php file.

If the constant or variable is not defined in the wp-config.php file then an error will be returned.

@param string $name
@param string $type
@param array $values

@return string The value of the requested constant or variable as defined in the wp-config.php file; if the
requested constant or variable is not defined then the function will print an error and exit.
Prints the value of a constant or variable defined in the wp - config . php file .