Code Duplication    Length = 2-2 lines in 2 locations

classes/PodsMeta.php 1 location

@@ 1295-1296 (lines=2) @@
1292
            return $post;
1293
		}
1294
1295
        if ( is_array( $post ) && !empty( $post ) && isset( $post[ 'ID' ] ) && 'attachment' == $post[ 'post_type' ] )
1296
            $post_id = $post[ 'ID' ];
1297
1298
        if ( is_array( $post_id ) || empty( $post_id ) )
1299
            return $post;

classes/PodsForm.php 1 location

@@ 533-534 (lines=2) @@
530
531
            $attributes = array_merge( $_attributes, (array) $attributes );
532
533
            if ( isset( $options[ 'attributes' ] ) && is_array( $options[ 'attributes' ] ) && !empty( $options[ 'attributes' ] ) )
534
                $attributes = array_merge( $attributes, $options[ 'attributes' ] );
535
        }
536
        elseif ( isset( $options[ $type . '_attributes' ] ) && is_array( $options[ $type . '_attributes' ] ) && !empty( $options[ $type . '_attributes' ] ) )
537
            $attributes = array_merge( $attributes, $options[ $type . '_attributes' ] );