Completed
Push — develop ( 0f41f0...4939cc )
by Zack
25:11 queued 19:29
created

GVLogic_Shortcode   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 85.71%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 6
cts 7
cp 0.8571
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_instance() 0 7 2
A shortcode() 0 4 1
1
<?php
2
/**
3
 * Shortcode to handle showing/hiding content in merge tags. Works great with GravityView Custom Content fields
4
 *
5
 * @deprecated
6
 * @since develop
7
 * @see \GV\Shortcodes\gvlogic
8
 */
9
class GVLogic_Shortcode {
10
	public static $instance = null;
11
12 2
	public static function get_instance() {
13 2
		if ( is_null( self::$instance ) ) {
14
			return self::$instance = new self(); // Nothing
0 ignored issues
show
Deprecated Code introduced by
The class GVLogic_Shortcode has been deprecated.

This class, trait or interface has been deprecated.

Loading history...
15
		}
16
17 2
		return self::$instance;
18
	}
19
20 2
	public function shortcode( $atts, $content = '', $tag = '') {
21 2
		$shortcode = new \GV\Shortcodes\gvlogic();
22 2
		return $shortcode->callback( $atts, $content, $tag );
23
	}
24
}
25