Code Duplication    Length = 3-3 lines in 2 locations

includes/class-wpinv-invoice.php 1 location

@@ 1423-1425 (lines=3) @@
1420
1421
        if ( ! empty( $this->fees ) && is_array( $this->fees ) ) {
1422
            foreach ( $this->fees as $fee ) {
1423
                if( 'all' != $type && ! empty( $fee['type'] ) && $type != $fee['type'] ) {
1424
                    continue;
1425
                }
1426
1427
                $fee['label'] = stripslashes( $fee['label'] );
1428
                $fee['amount_display'] = wpinv_price( $fee['amount'], $this->get_currency() );

includes/class-wpinv-item.php 1 location

@@ 372-374 (lines=3) @@
369
370
        if ( ! empty( $fees ) && ! empty( $type ) && 'all' !== $type ) {
371
            foreach( $fees as $key => $fee ) {
372
                if( ! empty( $fee['type'] ) && $type != $fee['type'] ) {
373
                    unset( $fees[ $key ] );
374
                }
375
            }
376
        }
377