Code Duplication    Length = 2-3 lines in 3 locations

classes/PodsUI.php 1 location

@@ 3956-3957 (lines=2) @@
3953
        $tag = trim( $tag, ' {@}' );
3954
        $tag = explode( ',', $tag );
3955
3956
        if ( empty( $tag ) || !isset( $tag[ 0 ] ) || strlen( trim( $tag[ 0 ] ) ) < 1 )
3957
            return null;
3958
3959
        foreach ( $tag as $k => $v ) {
3960
            $tag[ $k ] = trim( $v );

classes/Pods.php 1 location

@@ 3590-3591 (lines=2) @@
3587
		$tag = trim( $tag, ' {@}' );
3588
		$tag = explode( ',', $tag );
3589
3590
		if ( empty( $tag ) || !isset( $tag[ 0 ] ) || strlen( trim( $tag[ 0 ] ) ) < 1 )
3591
			return '';
3592
3593
		foreach ( $tag as $k => $v ) {
3594
			$tag[ $k ] = trim( $v );

includes/data.php 1 location

@@ 1534-1536 (lines=3) @@
1531
	$tag = trim( $tag, ' {@}' );
1532
	$tag = explode( '.', $tag );
1533
1534
	if ( empty( $tag ) || !isset( $tag[ 0 ] ) || strlen( trim( $tag[ 0 ] ) ) < 1 ) {
1535
		return '';
1536
	}
1537
1538
	// Fix formatting that may be after the first .
1539
	if ( 2 < count( $tag ) ) {