Code Duplication    Length = 2-3 lines in 4 locations

components/Templates/includes/functions-view_template.php 1 location

@@ 368-370 (lines=3) @@
365
			$tag = trim( $tag, ' {@}' );
366
			$tag = explode( ',', $tag );
367
368
			if ( empty( $tag ) || !isset( $tag[ 0 ] ) || strlen( trim( $tag[ 0 ] ) ) < 1 ) {
369
				return '';
370
			}
371
372
			foreach ( $tag as $k => $v ) {
373
				$tag[ $k ] = trim( $v );

classes/Pods.php 1 location

@@ 3716-3717 (lines=2) @@
3713
		$tag = trim( $tag, ' {@}' );
3714
		$tag = explode( ',', $tag );
3715
3716
		if ( empty( $tag ) || !isset( $tag[ 0 ] ) || strlen( trim( $tag[ 0 ] ) ) < 1 )
3717
			return '';
3718
3719
		foreach ( $tag as $k => $v ) {
3720
			$tag[ $k ] = trim( $v );

classes/PodsUI.php 1 location

@@ 4744-4745 (lines=2) @@
4741
		$tag = trim( $tag, ' {@}' );
4742
		$tag = explode( ',', $tag );
4743
4744
		if ( empty( $tag ) || ! isset( $tag[0] ) || strlen( trim( $tag[0] ) ) < 1 ) {
4745
			return null;
4746
		}
4747
4748
		foreach ( $tag as $k => $v ) {

includes/data.php 1 location

@@ 1546-1548 (lines=3) @@
1543
	$tag = trim( $tag, ' {@}' );
1544
	$tag = explode( '.', $tag );
1545
1546
	if ( empty( $tag ) || ! isset( $tag[0] ) || strlen( trim( $tag[0] ) ) < 1 ) {
1547
		return '';
1548
	}
1549
1550
	// Fix formatting that may be after the first .
1551
	if ( 2 < count( $tag ) ) {