1 | <?php |
||
10 | class RepeatOrdersPage extends AccountPage |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Standard SS method |
||
15 | */ |
||
16 | private static $db = array( |
||
17 | "WhatAreRepeatOrders" => "HTMLText", // explanation of repeat orders in general |
||
18 | "OnceLoggedInYouCanCreateRepeatOrder" => "HTMLText" //explaining the benefits of logging in for Repeat Orders |
||
19 | ); |
||
20 | |||
21 | /** |
||
22 | * Standard SS method |
||
23 | */ |
||
24 | private static $week_days = array( |
||
25 | "Monday" => "Monday", |
||
26 | "Tuesday" => "Tuesday", |
||
27 | "Wednesday" => "Wednesday", |
||
28 | "Thursday" => "Thursday", |
||
29 | "Friday" => "Friday", |
||
30 | "Saturday" => "Saturday", |
||
31 | "Sunday" => "Sunday" |
||
32 | ); |
||
33 | |||
34 | /** |
||
35 | * Return a link to view the order on the account page. |
||
36 | * actions are: create, update, view |
||
37 | * @param String $action |
||
38 | * @param int|string $orderID ID of the order |
||
|
|||
39 | */ |
||
40 | public static function get_repeat_order_link($action = 'view', $repeatOrderID = 0) |
||
48 | |||
49 | /** |
||
50 | * standard SS Method |
||
51 | */ |
||
52 | public function canCreate($member = null) |
||
60 | |||
61 | |||
62 | /** |
||
63 | * standard SS Method |
||
64 | */ |
||
65 | public function getCMSFields() |
||
72 | |||
73 | /** |
||
74 | * Returns all {@link Order} records for this |
||
75 | * member that are completed. |
||
76 | * |
||
77 | * @return ArrayList |
||
78 | */ |
||
79 | public function RepeatOrders() |
||
86 | |||
87 | /** |
||
88 | * Automatically create an AccountPage if one is not found |
||
89 | * on the site at the time the database is built (dev/build). |
||
90 | */ |
||
91 | public function requireDefaultRecords() |
||
110 | |||
111 | /** |
||
112 | * Standard SS method |
||
113 | * Sets the days available for repeating orders. |
||
114 | */ |
||
115 | public function onBeforeWrite() |
||
119 | } |
||
120 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.