Total Complexity | 2 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class PaymentQueryBuilder extends Builder |
||
10 | { |
||
11 | /** |
||
12 | * "whereSuccessful()" scope to filter only successful payments. |
||
13 | * Successful payments are payments with "status" field value equal to STATUS_SUCCESSFUL constant value. |
||
14 | * |
||
15 | * @return PaymentQueryBuilder |
||
16 | */ |
||
17 | public function whereSuccessful(): PaymentQueryBuilder |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * "wherePending()" scope to filter only pending payments. |
||
24 | * Pending payments are: |
||
25 | * "status" field anything other than STATUS_SUCCESSFUL constant value, |
||
26 | * PLUS |
||
27 | * "checks" field less than MINIMUM_REQUIRED_CHECKS constant value OR "created_at" timestamp less than 30 minutes. |
||
28 | * |
||
29 | * @return PaymentQueryBuilder |
||
30 | */ |
||
31 | public function wherePending(): PaymentQueryBuilder |
||
44 |