Completed
Push — master ( 17c312...573a52 )
by Jamie
03:10
created

FrmShortcodeHelper   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_shortcode_attribute_array() 0 12 3
1
<?php
2
/**
3
 * @since 2.02.12
4
 */
5
6
class FrmShortcodeHelper{
0 ignored issues
show
Coding Style introduced by
Class name "" is not in camel caps format
Loading history...
7
8
	/**
9
	 * Get the shortcode attributes in key/value pairs from a string
10
	 *
11
	 * @since 2.02.12
12
	 * @param string $text
13
	 *
14
	 * @return array
15
	 */
16
	public static function get_shortcode_attribute_array( $text ) {
17
		$atts = array();
18
		if ( $text !== '' ) {
19
			$atts = shortcode_parse_atts( $text );
20
		}
21
22
		if ( ! is_array( $atts ) ) {
23
			$atts = array();
24
		}
25
26
		return $atts;
27
	}
28
}