Code Duplication    Length = 2-2 lines in 2 locations

classes/PodsMeta.php 1 location

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

classes/PodsForm.php 1 location

@@ 515-516 (lines=2) @@
512
513
            $attributes = array_merge( $_attributes, (array) $attributes );
514
515
            if ( isset( $options[ 'attributes' ] ) && is_array( $options[ 'attributes' ] ) && !empty( $options[ 'attributes' ] ) )
516
                $attributes = array_merge( $attributes, $options[ 'attributes' ] );
517
        }
518
        elseif ( isset( $options[ $type . '_attributes' ] ) && is_array( $options[ $type . '_attributes' ] ) && !empty( $options[ $type . '_attributes' ] ) )
519
            $attributes = array_merge( $attributes, $options[ $type . '_attributes' ] );