RepeatOrdersTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A RepeatOrders() 0 7 1
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