Code Duplication    Length = 9-9 lines in 2 locations

includes/wpinv-invoice-functions.php 1 location

@@ 1834-1842 (lines=9) @@
1831
        $return = $invoices->posts;
1832
    }
1833
1834
    if ( $args['paginate' ] ) {
1835
        return (object) array(
1836
            'invoices'      => $return,
1837
            'total'         => $invoices->found_posts,
1838
            'max_num_pages' => $invoices->max_num_pages,
1839
        );
1840
    } else {
1841
        return $return;
1842
    }
1843
}
1844
1845
function wpinv_get_user_invoices_columns() {

includes/wpinv-item-functions.php 1 location

@@ 163-171 (lines=9) @@
160
        $return = $items->posts;
161
    }
162
163
    if ( $args['paginate' ] ) {
164
        return (object) array(
165
            'items'      => $return,
166
            'total'         => $items->found_posts,
167
            'max_num_pages' => $items->max_num_pages,
168
        );
169
    } else {
170
        return $return;
171
    }
172
173
}
174