RepeatOrdersTrait::RepeatOrders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * An collection of functions shared by RepeatOrdersPage and AcccountPage extension.
5
 *
6
 */
7
trait RepeatOrdersTrait
8
{
9
    /**
10
     * Returns all {@link Order} records for this
11
     * member that are completed.
12
     *
13
     * @return ArrayList
0 ignored issues
show
Documentation introduced by
Should the return type not be DataList?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
14
     */
15
    public function RepeatOrders()
16
    {
17
        $memberID = Member::currentUserID();
18
        return RepeatOrder::get()
19
            ->filter(['MemberID' => $memberID])
20
            ->sort('Created',  'DESC');
21
    }
22
}
23